2569 Commits

Author SHA1 Message Date
Kawe Mazidjatari
807d660883 Add CMake macro's
Macro's performing project wide, and common operations. Crafted for r5sdk, but it is still partially incomplete.
2023-05-09 23:55:46 +02:00
rexx
f310497464 fetch correct sdk module from pluginsdk 2023-05-08 19:28:16 +01:00
rexx
b7fafa6b65 temporary modsystem fix
this is a temporary fix for the incorrect g_pAlignedMemAlloc behaviour
g_pAlignedMemAlloc is supposed to be a pointer to a struct of 2 functions, but it is a pointer to a class with a virtual function table, causing invalid function addresses
This causes an access violation on this call
This should be fixed properly in the future
2023-05-08 19:15:53 +01:00
rexx
c29324b5dc rewrite PluginSystem_Init to use source filesystem 2023-05-08 19:12:52 +01:00
rexx
fc16e61deb allow AddFilestoList to search without extension 2023-05-08 16:12:37 +01:00
Kawe Mazidjatari
359820615f Move low level code to tier0/tier1
Moved to tier0/tier1 so it could be compiled into a static library in the future.
2023-05-06 22:59:01 +02:00
Kawe Mazidjatari
ad2352e9b6 Remove unused call from 'Script_PrecompileScripts' 2023-05-06 21:57:18 +02:00
Kawe Mazidjatari
94939b5b40 Mark filesystem singleton getter inline 2023-05-06 21:56:59 +02:00
Kawe Mazidjatari
966b94c4a0 Add filesystem utilities
Filesystem utilities that reduce duplicate code.
2023-05-06 21:56:27 +02:00
Kawe Mazidjatari
7555264d4e Add RSON free
Cleanup RSON memory.
2023-05-06 17:49:13 +02:00
Kawe Mazidjatari
d825fb9f58 Adjust type for 'g_pMallocPool' and rename
Adjusted type to 'CAlignedMemAlloc' and renamed it to 'g_pAlignedMemAlloc'. This global allocates  memory aligned.
2023-05-06 17:48:43 +02:00
Kawe Mazidjatari
75ccebb4b6 Squirrel system restructure
Properly decouple squirrel and game code. This makes it easier to reverse engineer more of this squirrel system, and to compile them as individual libraries later on when moving to CMake to significantly decrease compile times.
2023-05-06 16:23:56 +02:00
Kawe Mazidjatari
96ff01575f Add actual field types
These appear to fully aligns
2023-05-06 12:16:24 +02:00
Kawe Mazidjatari
f1da8d315d Improve CSquirrelVM methods
* Made part of class, hooks are static.
* Added proper return and parameter types to script compiler methods.
2023-05-04 00:24:10 +02:00
Kawe Mazidjatari
199c4caede Fix compiler warning
Cast to 'size_t' to suppress warnings.
2023-05-03 23:59:56 +02:00
Kawe Mazidjatari
39ccf8636d Force ConVar getters as inline 2023-05-03 23:59:33 +02:00
Kawe Mazidjatari
bc0904b148 Fix compiler error for Visual Studio 2017
Function 'is_directory' is only static in the Visual Studio 2017 headers.
2023-05-03 23:59:11 +02:00
Kawe Mazidjatari
dc96211b41 Update project files configuration
Adjusted compiler settings to match that of the Source SDK and the game executable.
2023-05-03 23:58:19 +02:00
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.
v2.2_rc5
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