16 Commits

Author SHA1 Message Date
Kawe Mazidjatari
ddfaea6ce2 Fix client.dll loading
* Moved dedicated server command line parameter init to 'init.cpp'.
* Registered 'SV_Main' on the client, this is engine code (lower level 'local' server wrappers).
* Disabled registration of Weapon_Bolt, although this is shared game code, this particular file is only used for the SERVER at this moment.
* Added the '-noserverdll' command lien parameter to instruct our loader.dll to load the client.dll instead.
* Adjusted the loader and sdklauncher project to support the loading of client.dll.
2023-07-19 16:00:36 +02:00
Kawe Mazidjatari
ad6466fa6c Add 'engine_cl' project to SDK and fix compiler errors
The 'engine_cl' library defines 'CLIENT_DLL', which prunes server specific code. This is used for the 'client.dll' project. Also fixed a compile error in 'CClient::VActivatePlayer', as it used a server only cvar. Ideally, this entire file gets ifdef'd out for engine_cl, currently it doesn't matter as nothing gets compiled in.
2023-07-19 02:30:07 +02:00
Amos
89458eb23e Fix dedicated server compiler error
Client exclusive, moved to client only group.
2023-06-22 18:26:29 +02:00
Kawe Mazidjatari
f2615b10de Improve CClient class structure
* Added structure for send/recv datablocks vtable.
* Mapped out CClient structure more.
* Fixed incorrect tick member offsets for CClient.
2023-06-22 00:33:00 +02:00
Kawe Mazidjatari
3f8baf6f68 Allow setting compile options for specific targets
Previously, it was all controlled from the global init (applied to all projects), but some projects need different options. With these changes, you can disable the common options applied in the 'add_module' macro, and set your own if desired.
2023-06-17 00:45:27 +02:00
Kawe Mazidjatari
bba1cdd8b2 Fix dedicated server compile errors
These files should have been placed into the client only group.
2023-06-04 11:19:30 +02:00
Kawe Mazidjatari
1afa75fec3 Fix >190FPS input system/simulation problems
Function 'CL_Move' has been fully rebuild in the SDK. Originally, the game checked if the delta time exceeded an amount defined by an immediate value, and dropped usercmd's if that was the case. This logic has been replaced with a more dynamic solution, and the console variable regulating this ('fps_input_max') is set to 200.0 by default (the same as the fix applied in the Season 9.1 Genesis update). This function also has been slightly optimized by removing duplicate operations that were performed in the original function. A second fix has been applied to 'CInput::JoyStickApplyMovement' that was also found changed in the Season 9.1 Genesis executable. In that function, an extraneous clamp was performed on the frame time causing viewstick problems when usercmd's get dropped in CL_Move.
2023-06-03 21:20:23 +02:00
Kawe Mazidjatari
3d18be9ebb Add splitscreen types to SDK
R5 'MAX_SPLITSCREEN_CLIENTS' appears to be max 1.
2023-06-03 18:10:32 +02:00
Kawe Mazidjatari
44edef1724 Add BSP types
Type 'StaticPropLump_t' has been moved to 'gamebspfile.h'.
2023-05-20 14:03:44 +02:00
Kawe Mazidjatari
11864f8902 Add all public headers to CMake projects
Added all public headers to CMake projects, also moved some files around in the public directory. Translation units have been moved to the libraries that were responsible for implementing them, as this game is monolithic.
2023-05-15 14:47:03 +02:00
Kawe Mazidjatari
9f44bcc818 Treat compiler warnings as errors
Treat them as errors globally. Most of the time a warning is a bug, or problem in code that could be solved in a different (better) manner. Thirdparty code have this disabled. The warnings as errors option can be globally disabled through the CMake GUI, but this is not recommended.
2023-05-15 09:44:26 +02:00
Kawe Mazidjatari
904976e4f5 Move shared files from server 2023-05-13 22:54:15 +02:00
Kawe Mazidjatari
67fb566dfb Compile launcher as separate library again 2023-05-13 20:03:42 +02:00
Kawe Mazidjatari
b94a9dcd7c Add dedicated server engine library
Added to CMake projects.
2023-05-13 17:48:00 +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
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