2537 Commits

Author SHA1 Message Date
rexx
d82467690b re-add RSON compile list hooks 2023-05-02 19:56:12 +01:00
rexx
e5c0149c56 fix mod script loading 2023-05-02 19:48:02 +01:00
rexx
bcc51460bc
new new modsystem pr (#96)
* modsystem v2 initial commit

* call CModSystem::Init

* clean up custom cvar value handling

* add mod script compiling support

* add error check to script rson loading

yes this error is a duplicate but this one exits the game

* fix typo

* fix compile error
2023-05-02 19:26:49 +01:00
Kawe Mazidjatari
e8f6bf0eda Bump signature cache version
Force a full rebuild as some signatures have changed.
2023-05-01 23:45:42 +02:00
Kawe Mazidjatari
0c26cc9b10 Add MOTD to playlists
Temporary MOTD.
2023-05-01 23:45:16 +02:00
Kawe Mazidjatari
2cdc6b0962 Change template parameter in squirrel structure
Should be 'ScriptDataType_t'; this structure is pending a refactor.
2023-05-01 23:44:51 +02:00
Kawe Mazidjatari
016e6c35fe Light formatting improvements in 'CAI_NetworkBuilder' 2023-05-01 22:51:31 +02:00
Kawe Mazidjatari
e2c7acef6f Remove call to CUtlVector<T>::Init
Constructor of CUtlVector calls it already.
2023-05-01 22:50:51 +02:00
Kawe Mazidjatari
c02e738866 Fix utlvector and utlstring destructor bug
Fix duplicate call to CUtlMemory<T>::Purge. This was caused due to an extra call performed in the destructor of CUtlVector and CUtlString. Disassembling the DLL after performing these changes revealed the destructor of the allocator is only getting called once now; the issue has been fixed.
2023-05-01 22:49:53 +02:00
Kawe Mazidjatari
629b7cd8a2 Merge branch 'indev' of https://github.com/Mauler125/r5sdk into indev 2023-05-01 21:55:02 +02:00
Kawe Mazidjatari
2083093139 Improve 'ScriptFunctionBinding_t' scrutcure
* Map out more fields.
* Allocate on stack within register function.
* Create dedicated initializer.
* Add compile time assert for structure size.
2023-05-01 21:54:50 +02:00
rexx
1055ba8994 add serverbrowser convars to fix script error 2023-05-01 20:41:27 +01:00
rexx
955e027ad2 refactor script function registration hooks
remove vm-specific hooks for registering custom SQVM funcs
2023-05-01 15:24:22 +01:00
rexx
f90bba9d85 Fix compile
This assert was accidentally left in to catch any invalid calling of CNetAdr::ToString
2023-05-01 15:15:06 +01:00
Kawe Mazidjatari
2de9df0f1a Add note to 'Script_CreateServer' 2023-05-01 02:09:19 +02:00
Kawe Mazidjatari
8c5f65968c Add UI script function 'IsServerActive'
Checks if the server is active (always returns false on non-server builds).
2023-05-01 01:59:24 +02:00
Kawe Mazidjatari
37832ecc00 Fix rare dedicated server crasher
Completely return out of this function, it is not necessary for dedicated server at all. Could crash as it calls a client side packet handler and some ui script related code.
2023-05-01 00:29:46 +02:00
Kawe Mazidjatari
366ff3fb4f Remove devonly flag from 'net_usesocketsforloopback' 2023-05-01 00:01:18 +02:00
Kawe Mazidjatari
8ffe04c736 Bump cache version
Force full rebuild of cache map due to changed/added/removed signatures.
2023-04-30 21:49:04 +02:00
Kawe Mazidjatari
39af321b54 Enable LZHAM fail exceptions 2023-04-30 21:48:31 +02:00
Kawe Mazidjatari
d953e5bafa Enable WIN32 API in LZHAM
Enables the WIN32 API in LZHAM with threading; this reduced the VPK build times with 23 minutes.
2023-04-30 21:48:11 +02:00
Kawe Mazidjatari
833c8aa3d8 Fix client dll compile error
Code is server only.
2023-04-30 21:44:37 +02:00
Kawe Mazidjatari
de572f675c Fix launcher bug
No Queued Packets Thread has been renamed to Queued Packets Thread, and therefore its toggle should be inverted. Enabled by default.
2023-04-30 21:44:06 +02:00
Kawe Mazidjatari
ef20846314 Remove extraneous include 2023-04-30 21:43:08 +02:00
Kawe Mazidjatari
299b47cbba Temporarily disable plugin system 2023-04-30 12:15:50 +02:00
Kawe Mazidjatari
6dce43616b Add 'Bits2Bytes' to SDK
Converts bitnum to bytenum.
2023-04-30 12:15:03 +02:00
Kawe Mazidjatari
0f660aee8b Construct 'fs::path' only once 2023-04-30 12:13:20 +02:00
Kawe Mazidjatari
8eea3546a6 Add reason to RCON client disconnect 2023-04-30 12:03:17 +02:00
Kawe Mazidjatari
cc38fabaa7 Change default value of 'rcon_password'
Changed to '[loopback]:37015' (always works, regardless of address type).
2023-04-30 11:57:49 +02:00
Kawe Mazidjatari
848098c71d Update state machine initialization order
* Run autoexec(_dev).cfg before anything else.
* Always initialize RCON (only gets ran if an actual password is set).
* Removed 'Cbuf_Execute()' call from 'CHostState::LoadConfig', let it run in the frame loop instead.
* Removed hardcoded set call for 'net_usesocketsforloopback', will be set in autoexec from now on.
2023-04-30 11:39:20 +02:00
Kawe Mazidjatari
c6748edcc9 Reboot RCON server if 'net_usesocketsforloopback' changed
Reboot so it could update accordingly, just like the game's UDP sockets.
2023-04-30 11:34:47 +02:00
Kawe Mazidjatari
f97cf6c249 RCON socket bind improvement
Check 'net_usesocketsforloopback' before binding sockets; allows binding to loopback as well.
2023-04-30 11:32:51 +02:00
Kawe Mazidjatari
90cf742fb5 Don't check for ban if client is a loopback address 2023-04-30 11:31:05 +02:00
Kawe Mazidjatari
17c8a5e49c Add const getter for 'CNetChan::remote_address'
Return as const reference.
2023-04-30 11:11:33 +02:00
Kawe Mazidjatari
d978d0c745 Reduce address buffer size to 128
128 is the max size that the entire address string could be (with it being ipv6 and bracketed with ports).
2023-04-30 02:10:57 +02:00
Kawe Mazidjatari
4554a92e27 Prevent connecting to null address string
Add check to prevent connect code getting fired if address buffer is empty.
2023-04-30 02:08:40 +02:00
Kawe Mazidjatari
f319fc0846 Use server global variables for client loops
Use server global variables for determining the num clients to loop over. This is cheaper and better than always looping over MAX_PLAYERS.
2023-04-30 01:50:38 +02:00
Kawe Mazidjatari
6b23570beb Ban system bug fix and improvements
* Format the ip as '[ip]:port' in all logging calls for consistency.
* Fixed a bug causing the IP to be send up as full instead of base only to master server (should always be base only).
* Temporarily uncommented the plugin callback logic.
2023-04-30 01:29:54 +02:00
Kawe Mazidjatari
98f09b25de CClient: Member type improvements
* Made 'm_nUserID' signed.
2023-04-30 01:26:37 +02:00
Kawe Mazidjatari
4ec8e67d9b CNetChan: Getters improvements
* Allow for requesting address base only.
* Added new getter 'GetPort'.
2023-04-30 01:24:45 +02:00
Kawe Mazidjatari
78a86fed6a Log address of 'SV_BroadcastVoiceData' 2023-04-29 21:07:45 +02:00
Kawe Mazidjatari
55aa254e6b Merge branch 'bulk_check' into indev 2023-04-29 21:01:59 +02:00
Kawe Mazidjatari
d52074238f Mark pylon refresh cvars as devonly
Marked 'sv_pylonRefreshRate' and 'sv_banlistRefreshRate' as development only.
2023-04-29 20:44:51 +02:00
Kawe Mazidjatari
7ecad819be Set dedicated nucleus id to '9990000' 2023-04-29 20:36:57 +02:00
Kawe Mazidjatari
a5bc2f77cb Fix broken 'SV_IsClientBanned' implementation
SV_IsClientBanned is now checked after the creating of CClient, and thus 'CServer::AuthClient' has been inlined into 'CServer::ConnectClient'. Since we have to request the master server to check whether or not this particular client is globally banned, we have to detach it into a separate thread, and process the results back into the main thread once finished. This takes too much time, so we connect the client anyways and if the master server marked it as 'banned', we disconnect it right away.
2023-04-29 20:36:29 +02:00
Kawe Mazidjatari
2748c61fe2 Put json value getters in try catch
Put 'nlohmann::json::value' operations in try catch, as these could raise an exception.
2023-04-29 14:58:46 +02:00
Kawe Mazidjatari
145bc3797f Only check token field if the server is hidden 2023-04-29 13:15:18 +02:00
Kawe Mazidjatari
d46061a55a Don't log GPU device on dedicated 2023-04-29 12:16:09 +02:00
Kawe Mazidjatari
3ea49766c6 Light banning code improvements
* Removed extraneous std::string constructors (everything using the bansystem used raw char pointers).
* Improved logging and function comments.
2023-04-29 12:15:51 +02:00
rexx
dca27475ec (re)implement sv_alltalk
Rebuilds SV_BroadcastVoiceData with an additional check of "sv_alltalk" cvar to disable team checking, allowing for servers to enable global voice chat
2023-04-29 11:11:10 +01:00