3498 Commits

Author SHA1 Message Date
Kawe Mazidjatari
1fe74fe727 Server: simplify lagcomp clamping code and add technical notes
Clamp to +- sv_maxunlag delta from server time base. Also added notes to possibly rework the system in the future.
2024-06-01 11:43:08 +02:00
Kawe Mazidjatari
c3f66e748f Server: add script function 'GetServerID()'
Allows one to get the current session uuid (will be used for LiveAPI's Init event for session identification).
2024-06-01 11:43:08 +02:00
Kawe Mazidjatari
6a99c1bd5c Launcher: untoggle windowed mode by default and rename field
Untoggled by default due to popular demand (most wanted to launch full screen). Also renamed maxFPS field to fpsMax to remain consistency with the actual cvar name.
2024-06-01 11:43:08 +02:00
Kawe Mazidjatari
51e4a11bdb Resource: add new LiveAPI configuration file
Executed on server launch.
2024-06-01 11:41:28 +02:00
Kawe Mazidjatari
39191f445f Resource: add new parallel VPK build script
Build script to build VPK files in parallel with use of the new tool 'ReVPK'.
2024-06-01 11:40:46 +02:00
Kawe Mazidjatari
caafe60cf2 Resource: update cleaner script
Added new LiveAPI log directory, and several files that were renamed.
2024-06-01 11:36:23 +02:00
Kawe Mazidjatari
aee8447320 Resource: update configuration files
Slightly adjusted RCON configuration files, recent changes implemented RCON encryption (users can specify their own AES keys).
2024-06-01 11:36:23 +02:00
Kawe Mazidjatari
a26e692b37 RTech: remove extraneous trailing semi-colon 2024-06-01 11:36:23 +02:00
Kawe Mazidjatari
84831f53b6 Engine: remove extraneous trailing semi-colon 2024-06-01 11:36:23 +02:00
Kawe Mazidjatari
b52a5cce48 NavMesh: rename editor program to 'recast'
Renamed to original tool name
2024-06-01 11:36:23 +02:00
Kawe Mazidjatari
890ffa923e Launcher: light overhaul and use KeyValues class
Reworked some of the code to make globals static and used KeyValues class to parse VDF files instead.
2024-06-01 11:35:07 +02:00
Kawe Mazidjatari
2c5e272c30 Tier0: bump sigcache version to force full rebuild
Many signatures have changed, force a full rebuild for the next patch to significantly speed up startup times.
2024-06-01 11:30:36 +02:00
Kawe Mazidjatari
5a2dfaf03a Server: add option to respect game state when performing auto reload
Can be toggled with the new cvar 'host_autoReloadRespectGameState', and used in combination with the new server script func 'SetAutoReloadState( bool state )'. This makes sure that even when the timer reaches 'host_autoReloadRate', it would wait with the reload until the game itself is finished (which is when SetAutoReloadState( true ) is being called from scripts).
2024-06-01 11:30:35 +02:00
Kawe Mazidjatari
9e0c375a7b Game: group game source files 2024-06-01 11:30:35 +02:00
Kawe Mazidjatari
19069f039b Engine: exec liveapi.cfg on start
Allow configuration of the LiveAPI system
2024-06-01 11:30:35 +02:00
Kawe Mazidjatari
aba53d7bed Engine: add cvar 'sv_lagpushticks' to SDK
Will be used for reworking some parts of the lag compensation system in the future.
2024-06-01 11:30:35 +02:00
Kawe Mazidjatari
bc7a26b170 Game: make GameMode_t an enum class
Used as enum class throughout code base, avoids potential name clashes in the future.
2024-06-01 11:30:35 +02:00
Kawe Mazidjatari
e0ee5d9a05 Engine: fix typo in CClientState member variable name
Renamed from m_nProcesseedDeltaTick to m_nProcessedDeltaTick.
2024-06-01 11:30:35 +02:00
Kawe Mazidjatari
14e851cc64 Engine: add newly reversed fields to CClient class 2024-06-01 11:30:35 +02:00
Kawe Mazidjatari
9236008159 Engine: light cleanup to CL_MoveEx()
Make *chan and commandTick const.
2024-06-01 11:30:35 +02:00
Kawe Mazidjatari
42e02b4569 UserCmd: limit command backlog to prevent exploitation
Implement UserCmd command backlog limiting (the new convar 'sv_maxUserCmdProcessTicks' dictates how many ticks can be processed per second). Defaulted to 10, which is (default tick interval (0.05) * default cvar val (10) = 0.5ms window), which is equal to the default of cvar 'sv_maxunlag'.

Before this patch, you could stuff several seconds worth of usercmd's in one second and achieve speed hacking.
2024-06-01 11:29:29 +02:00
Kawe Mazidjatari
824b5098b3 Game: add CBaseEntity::GetFlags() and FL_FAKECLIENT constant 2024-06-01 11:25:59 +02:00
Kawe Mazidjatari
cdaf4f1b76 Game: fixup types in CPlayerState 2024-06-01 11:25:59 +02:00
Kawe Mazidjatari
33564c7351 Tier2: use utlvector for cylinder points and initialize buffer 2024-06-01 11:25:58 +02:00
Kawe Mazidjatari
99cabd2ac8 UserCmd: cleanup variable names and comments
Reversed some extra field names + adjusted comment for clamping ucmd->camerapos (this was tested and works, this field should be clamped).
2024-06-01 11:25:58 +02:00
Kawe Mazidjatari
2587392f88 RTech: use more consistent type names
Force consistency between type names (follow scheme used in tier0 and rtech_game export symbols).
2024-06-01 11:25:58 +02:00
Kawe Mazidjatari
dea96ddf31 RTech: rename pak defines
More correct and consistent naming.
2024-06-01 11:25:58 +02:00
Kawe Mazidjatari
64f8f27bc8 Engine: initiate rcon connection from address change callback
A more user friendly approach.
2024-06-01 11:25:58 +02:00
Kawe Mazidjatari
85f9d26d23 Engine: use tier2 random generator for netkey
Limit usage to only 1 algorithm provider.
2024-06-01 11:25:58 +02:00
Kawe Mazidjatari
90e4711425 Tier2: move random generator from tier0 to tier2
Moved into cryptutils.cpp.
2024-06-01 11:25:58 +02:00
Kawe Mazidjatari
73aff08819 Resource: update RCON cfg files
Reflect recent changes made to the RCON system.
2024-06-01 11:25:57 +02:00
Kawe Mazidjatari
14c0746212 Engine: move rcon_password entirely to server
The client doesn't need this convar, client only needs cl_rcon_address.
2024-06-01 11:25:57 +02:00
Kawe Mazidjatari
cc5eda3a7e Tier1: remove unrelevant comment
No mutex locking should take place here after careful research.
2024-06-01 11:25:57 +02:00
Kawe Mazidjatari
b26ed2f746 Engine: implement encryption for RCON protocol
RCON lacked encryption, added AES-CTR encryption on RCON frames. Slightly adjusted protocol to take this into account (sending nonces, encrypted data itself, etc).
2024-06-01 11:24:47 +02:00
Kawe Mazidjatari
91d00d0ab3 ImGui: also take vertical scrollbar into account
Show horizontal scrollbar when console text gets overlapped by the vertical scrollbar.
2024-06-01 11:16:47 +02:00
Kawe Mazidjatari
e198980be4 ImGui: fix logger not fading in/out with alpha
m_fadeAlpha should also be applied on the color logger.
2024-06-01 11:16:47 +02:00
Kawe Mazidjatari
001a8db684 NetConsole: fix undefined symbol
CheckCPUforSSE2() was removed in commit 504d042e6095b24e125c7d38549db860b2d15a67, but NetConsole still needs to check for it.
2024-06-01 11:16:47 +02:00
Kawe Mazidjatari
1052401824 ReVPK: fix undefined symbol
CheckCPUforSSE2() was removed in commit 504d042e6095b24e125c7d38549db860b2d15a67, but ReVPK still needs to check for it.
2024-06-01 11:16:46 +02:00
Kawe Mazidjatari
f18829a487 Tier0: split CPU feature checks into multiple functions 2024-06-01 11:16:46 +02:00
Kawe Mazidjatari
7a331284eb RTech: take string pointer alignment into account
There are 2 versions of this function, one requires the string ptr to be aligned by 4.
2024-04-05 18:42:31 +02:00
Kawe Mazidjatari
e0c9f1e57f Miles: fix bug, add bank patch debug logs and add reversed miles types 2024-04-05 18:42:31 +02:00
Kawe Mazidjatari
8f7b86ec8d Windows: improve console init/shutdown error messages 2024-04-05 18:42:31 +02:00
Kawe Mazidjatari
bf5dd318a7 Core: fix several initialization bugs
- Don't free console if the process is being closed from the console, this will cause the process to freeze within the FreeConsole() call
- Properly check for CPU features in order, and moved all checks to a single function utilizing the CPUInformation struct.
- Made SDK_Init() and SDK_Shutdown() more resilient against mistakes with new checks and error messages (added since they are exported now).
2024-04-05 18:42:30 +02:00
Kawe Mazidjatari
b4ad19275f ImGui: fix console scrollbar feedback loop bug
Make use of newly added flag "ImGuiWindowFlags_OverlayHorizontalScrollbar" as per commit 60e4514b7b5c56db89102a3d66ef28a14118b8fd. Also removed flag "ImGuiWindowFlags_AlwaysVerticalScrollbar", only show the vertical scrollbar when its visible. Enabled code that takes the scrollbar into account in function CTextLogger::EnsureCursorVisible().
2024-04-05 18:42:30 +02:00
Kawe Mazidjatari
07ca7e1231 ImGui: add flag to draw scrollbars over content
Custom flags: basically tells ImGui to draw the scrollbar as an overlay. This is useful for working around feedback loops caused by the appearance of the scrollbars (might be worth PR'ing into ImGui itself?)

See:
ocornut/imgui#1720
ocornut/imgui#1730
ocornut/imgui#2978
2024-04-05 18:42:30 +02:00
Kawe Mazidjatari
65eaade807 RTech: disable LiveAPI by default 2024-04-05 18:42:30 +02:00
Kawe Mazidjatari
d1b2fe805f RTech: use SQString's '_stringval' macro for LiveAPI
Light code cleanup, no logic has been modified.
2024-04-05 18:42:30 +02:00
Kawe Mazidjatari
6d8315626e Thirdparty: upgrade ZStd to 1.5.6 2024-04-05 18:42:29 +02:00
Kawe Mazidjatari
ebffccf587 Thirdparty: upgrade RapidJSON to latest
Upgraded to Tencent/rapidjson@5ec44fb920
2024-04-05 18:42:29 +02:00
Kawe Mazidjatari
873e20c121 RTech: implement Nucleus ID hashing for LiveAPI events
The field was supposed to be hashed, added cheap hashing logic and an option to truncate it to reduce overhead.
2024-04-05 18:42:29 +02:00