163 Commits

Author SHA1 Message Date
Kawe Mazidjatari
fed4ce80bf RTech: properly disable asset streaming on dedicated server
Just set the mode to 0, required as we rebuilt the functions and can't really check for dedicated there, we have to initialize it with this mode.
2024-04-05 17:56:51 +02:00
Kawe Mazidjatari
3d207d30a2 DataCache: rework datacache invalid data handling
This is a more reliable solution as pretty much all code patch in CMDLCache checks the ptr for NULL, but none of them do for 0xDEADFEEDDEADFEED (probably a debug only thing that somehow made it into this build). Patched out so the engine could deal with it properly. Anything interesting already gets logged from the SDK so we won't miss out on anything patching this out.
2024-04-05 17:26:16 +02:00
Kawe Mazidjatari
97c534ed60 DataCache: fix inline crash 2024-04-05 17:24:29 +02:00
Kawe Mazidjatari
be8ee3d0b1 SDK cleaner script is now in the bin dir 2024-04-05 16:34:28 +02:00
Kawe Mazidjatari
1687b633f3 Update SDK cleaner script 2024-04-05 16:34:28 +02:00
Kawe Mazidjatari
98a5cdc246 Spawn AI hints so the entire AI Network can be cached 2024-04-05 16:34:27 +02:00
Kawe Mazidjatari
1b5238eab0 Rename VPK build scripts 2024-04-05 16:31:08 +02:00
Kawe Mazidjatari
5d2a331170 CFG cleanup
Remove dev parameters from retail configs, disable net_usesocketsforloopback by default now. This was a leftover from before we got dedicated servers working, and was thus required to get other people to connect to the listen server. This is no longer needed, it was causing a problem with authentication on the local server as the input address from the client would differ from what the master server would bake into the JWT token (localhost translates into an actual ip address on the master server side).
2024-04-05 16:24:47 +02:00
Kawe Mazidjatari
f6d2628937 Cleanup proto structure
Removed unused/extraneous enumerants.
2023-08-04 11:20:24 +02:00
Kawe Mazidjatari
4bef9fc6cf Light script cleanup
- Rename 'checksum' to 'digest'.
- Sort the data in the correct order to reduce load on the client (client sorts it to the same order).
2023-08-03 17:25:11 +02:00
Kawe Mazidjatari
010c0d0c20 Improve manifest script
- Add configuration support for each depot
- Add configurable vendor for each depot
- Add size field for each depot (used for installer's progress callback)
- Compute depot package checksum on the spot
- Take manifest version input as string instead (used as tags)
2023-08-03 16:43:22 +02:00
Kawe Mazidjatari
9a23ab68ec Rename output file 2023-07-31 11:43:42 +02:00
Kawe Mazidjatari
de26e5735f Add depot names to manifest json 2023-07-30 13:35:55 +02:00
Kawe Mazidjatari
631535a4c9 Add json fields for manifest version and asset list
Make it so it could actually be checked and parsed properly.
2023-07-30 01:25:13 +02:00
Kawe Mazidjatari
da3142812b Create script for creating manifest files 2023-07-29 23:34:19 +02:00
Kawe Mazidjatari
e4a05b4a93 Increase oriented bone to world memory
Increase to 2MiB, so all 120 players could be rendered on the client without overflowing the bone memory (which causes an error in 'CModelRenderSystem::DrawModels').
2023-07-17 02:51:01 +02:00
Kawe Mazidjatari
f0bef4a537 Fix formatting 2023-07-17 02:48:14 +02:00
Kawe Mazidjatari
e515c2d93f Don't force game into windowed mode on each launch
Let the video config decide whether or not to launch windowed.
2023-07-15 21:33:47 +02:00
Kawe Mazidjatari
1496e86273 Remove 'rui_defaultDebugFontFace' asignment
Redundant, as its defaulted to 'ArameMono' in the executable now.
2023-07-15 21:31:34 +02:00
Kawe Mazidjatari
89092a9bb8 Update navmesh build automation script
Copy levels navmeshes that have identical geometry.
2023-07-15 21:30:42 +02:00
Kawe Mazidjatari
48a8b5c36c Remove unused parameter
No longer used, removed.
2023-07-15 17:10:04 +02:00
Kawe Mazidjatari
fbe136df64 Rename command 'fs_vpk_build' --> 'fs_vpk_pack' 2023-07-15 17:03:42 +02:00
Kawe Mazidjatari
40bcef2682 Fixup exec paths in 'build_all_vpk.cfg'
Point to new location that changed in commit afb09e1d.
2023-07-14 00:39:08 +02:00
Kawe Mazidjatari
afb09e1d05 Cleanup CFG directory
Move to dedicated subdirectories.
2023-07-13 23:15:10 +02:00
Kawe Mazidjatari
cfa2172322 Undo CUtlBuffer::ParseToken patch
The bug was only reproduced on the compiled implementation in the game executable. The CUtlBuffer::ParseToken implementation in the SDK did not bug on the same input string. More research is required, and a possible good fix would be to just hook and replace the game's implementation with that of the SDK.
2023-06-23 00:27:24 +02:00
Kawe Mazidjatari
a93824b2db Discard invalid string commands
Must be UTF-8 encoded, currently there are no checks.
2023-06-22 23:45:19 +02:00
Kawe Mazidjatari
4290b08fd0 Fix desync in CUtlbuffer::ParseToken in assembled code
See commit 4969a840300bbafbc5a47f06fef41751a5620fc9, the same fix has been applied to the game executable.
2023-06-07 22:15:28 +02:00
Kawe Mazidjatari
70f89c1bd8 Fix incorrect ConVar string assignment in executable
This ConVar's name was set to its helpstring. This patch solves it by assigning the name field to an existing string that makes sense, and moving the helpstring into the actual helpstring field. An additional instruction has been inserted to load the NULL string address into RAX, which required light instruction shifting. After performing this patch, the ConVar now could be ser in the console.
2023-06-05 10:27:23 +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
a061f7dd00 Optimize C2S_CONNECT vuln fix
Save 2 bytes from segment padding by performing zero test at original address followed by the long jump to patch, there were 5 bytes, zero test only requires 2, thus only 3 bytes were nopped with these changes.
2023-05-31 21:25:16 +02:00
Kawe Mazidjatari
c2799ff68c Fix bug in vulnerability patch
Value should be treated as unsigned, else negative values could still be used to read outside the static buffer.
2023-05-30 20:24:52 +02:00
Amos
46fafef60c Fix vulnerability in C2S_CONNECT message parser
Thanks Robotic for reporting the crash!
2023-05-30 10:03:53 +02:00
Kawe Mazidjatari
71b7770968 Add BSP converter batch file
Automate BSP version conversions.
2023-05-29 01:04:39 +02:00
Kawe Mazidjatari
245d13cea8 Create map rename script
Rename all files associated to a BSP with a single command.
2023-05-28 10:31:17 +02:00
Kawe Mazidjatari
1fbc3291c7 Fix EOF read errors and PAKFILE_LUMP not loading correctly when discrete
This commit adds support for loading cubemap lumps from the disk, several patches and hooks had to be implemented to make this work. Since the game was trying to read the pakfile lump from the BSP file (even when absent), it would read EOF (heavily reduces down map loading performance).
2023-05-22 12:32:49 +02:00
Kawe Mazidjatari
0c26cc9b10 Add MOTD to playlists
Temporary MOTD.
2023-05-01 23:45:16 +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
94ae3e58ce Fix exploitable code defect in 'CNetChan::ProcessSubChannelData'
Patch applied to server & client.
2023-04-13 22:38:03 +02:00
Kawe Mazidjatari
4c8952ac96 Improve formatting in patch file document 2023-04-13 20:29:46 +02:00
Kawe Mazidjatari
a26ad748c8 Add patch for dedicated server executable
This patch prevents 'fps_max' from being reset in 'CEngine::Frame' if 'sv_cheats' isn't set; this cvar is now bound to the server's tickrate in sdk code to save CPU time.
2023-04-10 22:36:32 +02:00
Kawe Mazidjatari
fd2c7864b9 Update VPK build scripts
* Added 'mp_rr_party_crasher'.
* Renamed 'mp_lobby' to 'mp_common' for server.
2023-04-10 02:09:16 +02:00
Kawe Mazidjatari
df98f30c57 Rename '-ansiclr' to '-ansicolor' 2023-03-27 17:10:11 +02:00
Kawe Mazidjatari
608f14e920 Update protobuf source files
Added new field 'messageType'; renamed 'responseID' to 'messageID', renamed 'responseBuf' to 'responseMsg'.
2023-03-27 01:37:15 +02:00
Kawe Mazidjatari
27ddc30d68 Prune ununsed/useless cvars
Also removed these from the CFG files.
* 'sq_showvmoutput' has been renamed to 'script_show_output'.
* 'sq_showvmwarning' has been renamed to 'script_show_warning'.
2023-03-26 18:18:50 +02:00
rexx
af547c4a5e
Fix typo in dedi patch file 2023-02-26 21:47:32 +00:00
Kawe Mazidjatari
353aee5c2f Add new dedicated server patches 2023-02-26 22:20:06 +01:00
Kawe Mazidjatari
e640ecc391 New dedicated server (r5apex_ds.exe) patches
Added 2 new patches:
* Patch0: Unnecessary loop called from 'CModelLoader::UnloadModel'. This calls a 'nullsub' CMaterialGlue vtable method.
* Patch1:  CClientState constructor; Removed due to high mem allocation during init (100MiB+). 'CClientState' is useless on dedicated, and all its feature are thereof disabled.
2023-02-26 19:45:11 +01:00
Kawe Mazidjatari
e738ed9cc5 Update playlists file
Disable circle spawn by default in dev_default.
2023-02-12 23:11:41 +01:00
Kawe Mazidjatari
7928ac3b4c Fix SDK Launcher compiler error
Path has to be changed due to project include changes. The r5dev directory is no longer a system include, however, the compiler expects includes from system when compiling resources.
2023-02-06 23:53:32 +01:00
Kawe Mazidjatari
a8ef2b74cd Implement ConCommand completion logic
Implementation of the ConCommand completion logic for the Dear ImGui console panel.
2023-02-05 19:21:39 +01:00