3758 Commits

Author SHA1 Message Date
Kawe Mazidjatari
639f4741b1 VScript: add ScriptStatus_t enum
Enum values are correct based on 'CSquirrelVM::ExecuteFunction()'.
2024-06-01 11:46:05 +02:00
Kawe Mazidjatari
33f926da74 Launcher: fix compiler error
Prototype changed in commit c261db243e7de0a57445ed9bb036238a7171e572.
2024-06-01 11:46:05 +02:00
Kawe Mazidjatari
cfc2deada4 Resource: add LiveAPI documentation 2024-06-01 11:45:25 +02:00
Kawe Mazidjatari
a54fec9e18 ImGui: increase base64 key buf size
Make buffer size as large as that of the engine itself (used to represent the string in class CNetKey).
2024-06-01 11:43:11 +02:00
Kawe Mazidjatari
8ac582ee82 ImGui: improve browser modal QOL
Hitting enter will now also submit the request.
2024-06-01 11:43:11 +02:00
Kawe Mazidjatari
535d2cdfba ImGui: fix server modal token input bug
The string buffer was moved to the stack on a recent refactor, but the data must persist even outside the function scope. Moved back to class in form of a buffer.
2024-06-01 11:43:11 +02:00
Kawe Mazidjatari
afb53b899c ImGui: update default server browser width
As of the recent layout changes, buttons and widgets looks the sharpest on this width; default to this width instead.
2024-06-01 11:43:11 +02:00
Kawe Mazidjatari
e7d3e8d23d NetConsole: log header/version as soon as possible
Logged right after console and terminal is initialized.
2024-06-01 11:43:11 +02:00
Kawe Mazidjatari
9a3ea6b53a Resource: add missing command line parameter client configs
Since the implementation of the loader system, client's need '-noserverdll' to work properly when launched from the SDK launcher.
2024-06-01 11:43:11 +02:00
Kawe Mazidjatari
861b4b6b2b Launcher: surface and launcher code overhaul
- SDK Launcher is now a proper GUI app (no longer defaults to terminal, but can of course still be used in the terminal).
- Set uniform font on all controls (GetStockObject sometimes returns fonts that isn't currently supported on the UI layout causing text to clip; we don't show in other languages or character encodings so we should just default to Microsoft Sans Serif).
- Make anchors uniform for all controls (resize not yet supported).
- Don't attempt to send commands to game instances if command string is null or empty.
- Clamp surface console list size to window size.
- Remove surface console logger boilerplate (surface logging is now a dedicated function).
- Use actual SDK logging system for console prints/warnings/errors.
- Fixed bug where the use of a shared stack buffer caused truncated parts of the file name to end up in the command line text.
2024-06-01 11:43:10 +02:00
Kawe Mazidjatari
5d680c89d9 Windows: fix prototype mismatch
Mismatched since commit acaf3fdfad319cea142ba58ce9214aec14715ff0.
2024-06-01 11:43:10 +02:00
Kawe Mazidjatari
dc8a22c05e Windows: move console color init code to separate function
Reserve Console_Init() for actual console init, if code only needs colors (e.g. a console application that already has a console), then they should call Console_ColorInit().
2024-06-01 11:43:10 +02:00
Kawe Mazidjatari
8e81d99585 CppKore: fix potential font resource leak
As of commit 168ad9aabd624510045d56aabcbfeff6f4aaad6f, we can assign uniform fonts to all child controls, but only 1 control can own the font resource. This is by default false since we do not want to free the resource when destroying the child controls, but we do want to free it once the parent window gets destroyed.
2024-06-01 11:43:10 +02:00
Kawe Mazidjatari
d5db4674a4 CppKore: add getter for child control count 2024-06-01 11:43:10 +02:00
Kawe Mazidjatari
4c99efa889 CppKore: try parent font if current is absent
This allows for setting uniform fonts on all controls, by only assigning the font once to the parent control. Else each control needs to have its own set.
2024-06-01 11:43:10 +02:00
Kawe Mazidjatari
29ff073ae3 NetConsole: fix command line bug
Recently, encryption was implemented in the RCON system, but the command line initialization code wasn't adapted to this new logic. Code has now been adapted.
2024-06-01 11:43:10 +02:00
Kawe Mazidjatari
d80268492a Tier1: fix typo in byteswap.h 2024-06-01 11:43:09 +02:00
Kawe Mazidjatari
8ffb647686 Server: use correct type for hull data used for AI Network
System uses a CVarBitVec for this hull block data.
2024-06-01 11:43:09 +02:00
Kawe Mazidjatari
9de5f4988f RTech: fixed streamed pak decoding progression bug
During beta tests on a Linux system, we encountered an issue where the I/O could be slower and thus result in not enough bytes being streamed by the time we invoke the decoder (lenStreamed == bufSizeNeeded at this point), after 16 calls with lenStreamed == bufSizeNeeded, the engine errors as ZSTD_NO_FORWARD_PROGRESS_MAX would be reached. Added value of 'ZSTD_nextSrcSizeToDecompress()' to 'PakDecoder_s::bufferSizeNeeded' to make sure we never call the decoder without any new streamed bytes. Also increased the value of ZSTD_NO_FORWARD_PROGRESS_MAX to 1024 since this fixed the issue without applying the aforementioned patch, this was increased as a hardening measure.
2024-06-01 11:43:09 +02:00
Kawe Mazidjatari
59d4affebe Server: removed unreferenced local variable
Unused variable as current time calculation ended up being unnecessary, removed to suppress compiler warning.
2024-06-01 11:43:09 +02:00
Kawe Mazidjatari
b201ca7a5b Engine: fix incorrect assignment on rcon socket bind
The assignment on the ternary operator should be flipped, bug was spotted during beta testing.
2024-06-01 11:43:09 +02:00
Kawe Mazidjatari
88bb1307be Engine: move unrestricted command exec code to separate function 2024-06-01 11:43:09 +02:00
Kawe Mazidjatari
cb72778a25 Core: allow launching dedicated server without terminal window
The terminal window isn't always necessary, especially on Linux systems. In fact, it causes issues on some Wine environments. Allow user to disable it with -noconsole. This option only exists on the dedicated server. The client builds have the console disabled by default, and can enable them with -wconsole.
2024-06-01 11:43:09 +02:00
Kawe Mazidjatari
5d38b3762b Engine: enforce rcon convar name consistency
Removed extra '_' from sv_rcon_whitelist_address, its now sv_rcon_whitelistaddress.
2024-06-01 11:43:08 +02:00
Kawe Mazidjatari
6eee25a4e9 Engine: use dedicated convar to determine rcon server socket bind
Decoupled from net_usesocketforloopback since we actually don't want this to be tied with that of the game. Now it by default does not bind to the loopback socket unlike the game.
2024-06-01 11:43:08 +02:00
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