15 Commits

Author SHA1 Message Date
Kawe Mazidjatari
dccb897c27 Make 'sv_usercmd_dualwield_enable' server and client
Must be for server and client, as its used in shared code.
2023-07-19 02:14:09 +02:00
Kawe Mazidjatari
fbe136df64 Rename command 'fs_vpk_build' --> 'fs_vpk_pack' 2023-07-15 17:03:42 +02:00
Kawe Mazidjatari
728eff81c8 Remove devonly flag from 'sv_single_core_dedi' cvar
Allow setting this in retail mode.
2023-07-11 00:18:58 +02:00
Kawe Mazidjatari
804b46998f Enable the modsystem again
The initialization crash has been fixed in commit '15244bf2', where if the 'platform/mods' folder didn't exist, an exception would be raised and the process would be aborted. Now, when that folder is absent, the mod system won't initialize.
2023-07-09 22:51:14 +02:00
Kawe Mazidjatari
4f806ee2ba Remove dead cvar
No longer used.
2023-07-08 18:28:27 +02:00
Kawe Mazidjatari
8f480d924b Add cvars for modsystem
Add cvars to enable/disable the modsystem, also added cvars to toggle modsystem debug.
2023-07-08 13:22:30 +02:00
Kawe Mazidjatari
7d456b8b61 Add 'player_userCmdsQueueWarning' cvar to SDK
Will be used for the 'CPlayer::ProcessUserCmds' rebuild.
2023-07-02 21:28:49 +02:00
Amos
b13cc071a9 Improve ban commands
The ban commands have the 'sv_' prefix removed. CBaseEntity::InputKill expects 'kickid' to be present, it uses this to kick the player once the entity has been destroyed. Not doing so could lead into a crash or other undesired behavior.
2023-06-22 09:09:38 +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
51ea9c7c4f CUserCmd hardening
Fix several exploitable bugs in the CUserCmd class. Some of these have been used to exploit/cheat in-game. Fixes contain:
- Camera position clamping (the only patch that hasn't been tested yet!)
- Weapon activity exploit, allowing player to infinitely throw ordnances, and perform other 'cheats'.
- Akimbo exploit + server crasher, allowing client to set multiple inventory weapons as active. The active weapon index bounds were also not checked, a properly crafter CUserCmd message would therefore be able to crash the server.

Note that this does not fix all issues related to the UserCmd class; further reversing and testing revealed there is more to be fixed, these fixes will get implemented with a future commit.
2023-06-13 17:43:32 +02:00
Kawe Mazidjatari
9f2b1b1bb5 Improve CL_Move rebuild
Ported the logic from the more recent builds into the SDK rebuild. Note that this isn't all that has changed in the live builds, but were the only things worth porting back. Frame times are now properly clamped on the client. Some testing revealed that the movement now feels identical to the live version of the game, which was the target. This commit also fixes a bug in CL_Move were the datagram was not send, and the next cmd time wasn't set if the client was NOT active, while it should have.
2023-06-05 00:27:36 +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
abef34d3ef CPackedStore refactor
* Improve naming convention, and make it more consistent.
* Use engine types as much as possible.
* Reduced the amount of string copy constructions.
2023-05-29 21:41:17 +02:00
Kawe Mazidjatari
7ddd33c8de Force name consistency
Renamed to just 'netconsole' as it was phrased like that throughout other files.
2023-05-15 18:00:51 +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