2593 Commits

Author SHA1 Message Date
Kawe Mazidjatari
3a4ce7cf02 Comment unused function pointer (NULL on dedi)
Not getting used anywhere, and was NULL on dedi.
2023-05-13 18:04:30 +02:00
Kawe Mazidjatari
8d38de1ce0 Move client only code from rtech libraries
Moved, and renamed to 'CreateTextureResource'. Reason for move was that the rtech libraries is used by server and client, and using this on dedicated requires linking directx libraries, as it has to be hooked (even when not used). Moved to client only code to avoid having to hook it. Material system is no longer linked to the dedicated server module, as nothing from it was getting used.
2023-05-13 18:03:48 +02:00
Kawe Mazidjatari
d9cc37914a Add server and client DLL to CMake projects 2023-05-13 17:48:19 +02:00
Kawe Mazidjatari
b94a9dcd7c Add dedicated server engine library
Added to CMake projects.
2023-05-13 17:48:00 +02:00
Kawe Mazidjatari
de02febdc0 Fix assert failure in netconsole caused by AddDetour
Remove extraneous register call for detour callbacks.
2023-05-13 14:05:08 +02:00
Kawe Mazidjatari
08384346bf Setup log callback sink for netconsole 2023-05-13 14:04:13 +02:00
Kawe Mazidjatari
8b60300dce Guard mathlib debug globals
Only compile when 'DEBUG_MATHLIB' is set.
2023-05-13 14:03:42 +02:00
Kawe Mazidjatari
84c43cffa8 Properly setup netconsole CMakeLists 2023-05-13 14:02:47 +02:00
Kawe Mazidjatari
7ef50395eb Remove unused header file 2023-05-13 14:02:16 +02:00
Kawe Mazidjatari
f22504f095 Enable whole program optimization for naveditor
Libs use them under the same PCH.
2023-05-13 12:11:02 +02:00
Kawe Mazidjatari
fdfc0a748b Remove extraneous project 2023-05-13 12:10:32 +02:00
Kawe Mazidjatari
e5a455e7c7 Apply whole program optimization for certain targets
Only applied to certain targets to prevent bombing compile times; other projects don't really benefit of this.
2023-05-13 11:57:57 +02:00
Kawe Mazidjatari
5ba0beab40 Set stack reserve size for GameSDK project
Should match that of the game executable.
2023-05-13 10:46:54 +02:00
Kawe Mazidjatari
1ef573a9b2 Fix compile errors on Visual Studio 2017
Error: ''std::isdigit': no matching overloaded function found'.
2023-05-13 10:35:05 +02:00
Kawe Mazidjatari
d7ef449e15 Split RTech libraries 2023-05-13 10:34:23 +02:00
Kawe Mazidjatari
dcb22a5a13 Fix code crash caused by missing resource file
Crashes when the developer console gets invoked due to missing textures.
2023-05-13 01:49:31 +02:00
Kawe Mazidjatari
7419170b63 Add batch file for creating solutions 2023-05-13 00:15:53 +02:00
Kawe Mazidjatari
8dbc2024c6 CMake code improvements
Use the 'add_module' macro to add modules without creating duplicate code. This macro also takes a reuse PCH as parameter, so modules that need a precompiled header, could reuse those from different targets that compile them. This commit also restructures the group order of the generated solution files for easier code navigation.
2023-05-13 00:14:53 +02:00
Kawe Mazidjatari
7a745a404a Add CMake macro for adding modules
Add macro for adding modules and setting all the properties at ones.
2023-05-11 23:50:57 +02:00
Kawe Mazidjatari
ce0ce28040 Cleanup main CMakeLists
Move init to 'Configure.cmake', and enable the use of folders within project files.
2023-05-11 23:50:06 +02:00
Kawe Mazidjatari
ee636477ce Uncomment
Header file exists, but is stubbed; uncomment.
2023-05-11 21:35:54 +02:00
Kawe Mazidjatari
af21798a12 Fix crash caused by NULL Cbuf function pointers
Register was missing (code was moved elsewhere).
2023-05-11 21:05:09 +02:00
Kawe Mazidjatari
d1157fb54b Fix PDB path not getting written properly for shared libraries 2023-05-11 21:04:21 +02:00
Kawe Mazidjatari
f120354e96 Initial port to CMake
* All libraries have been isolated from each other, and build into separate artifacts.
* Project has been restructured to support isolating libraries.
* CCrashHandler now calls a callback on crash (setup from core/dllmain.cpp, this can be setup in any way for any project. This callback is getting called when the apllication crashes. Useful for flushing buffers before closing handles to logging files for example).
* Tier0 'CoreMsgV' function now calls a callback sink, which could be set by the user (currently setup to the SDK's internal logger in core/dllmain.cpp).

TODO:
* Add a batch file to autogenerate all projects.
* Add support for dedicated server.
* Add support for client dll.

Bugs:
* Game crashes on the title screen after the UI script compiler has finished (root cause unknown).
* Curl error messages are getting logged twice for the dedicated server due to the removal of all "DEDICATED" preprocessor directives to support isolating projects. This has to be fixed properly!
2023-05-10 00:05:38 +02:00
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