2617 Commits

Author SHA1 Message Date
Kawe Mazidjatari
437a54486d Fix typo in 'bf_write' 2023-04-18 20:14:20 +02:00
Kawe Mazidjatari
d22b91fd72 Rename enumerant in 'CCrashHandler' 2023-04-18 20:13:51 +02:00
Kawe Mazidjatari
5a90e2cff3 Remove deprecated workaround
No longer required as of commit f520cab4.
2023-04-18 18:41:06 +02:00
rexx
f520cab44b fix static prop exceptions
This fixes the exceptions that were caused by loading ported bsps with replaced models
CStaticProp::Init was using static prop lump data to request non-existent skins due to the replaced models, causing invalid material pointers to be fetched.
When encountered, these skins will be forced to 0 and an error will be printed.
Ideally these issues are fixed from within the bsp file before they are shipped.
2023-04-18 16:56:35 +01:00
Kawe Mazidjatari
85f586bd2e RCON server improvements
* Prevent attacker from being able to abuse and overflow the banned list vector.
* Improved IPv6 comparison performance.
* Change size fields of payload frame from unsigned to signed.
* Close all accepted sockets on RCON server shutdown.
2023-04-16 17:51:48 +02:00
Kawe Mazidjatari
050a27e387 Fix compiler warning on dedicated server
Mark parameter as unused.
2023-04-16 15:51:51 +02:00
Kawe Mazidjatari
2caede5099 Add asserts in CSocketCreator 2023-04-16 15:51:16 +02:00
Kawe Mazidjatari
b5b379fff9 Determine net console frame tick rate using an interval 2023-04-16 15:49:07 +02:00
Kawe Mazidjatari
bd1bec3cfe Several RCON bug fixes and improvements
* Fixed uncontrolled format specifier in 'NetMsg' call on the RCON client.
* Removed extraneous call to 'PrintPercentageEscape'.
* Compare, and disable RCON logs if user attempts to connect to listen server's RCON.
2023-04-16 12:05:39 +02:00
Kawe Mazidjatari
5f4b436ec6 Only attempt to send RCON log if its not from the client 2023-04-16 11:59:56 +02:00
Kawe Mazidjatari
a11012f3bf Set port on global netadr object
Set the port so it could be used to compare addresses.
2023-04-16 11:58:37 +02:00
Kawe Mazidjatari
35e0d9e8c8 Disable 'cl_threaded_bone_setup' at all times
Disabled in the gamesdk at all times as users have reported issues that causes the game to freeze when switching from a remote server to a listen server. The engine bug still needs to be addressed.
2023-04-16 11:57:45 +02:00
Kawe Mazidjatari
c354d7ae02 Add ability to compare IPv6 addresses 2023-04-16 11:55:57 +02:00
Kawe Mazidjatari
8bf105b072 Smoother fade animation for ImGui panels
Fade out when disabled too, in steps of 0.5f. SDK fixed frame has been increased to 100tps.
2023-04-16 02:45:22 +02:00
Kawe Mazidjatari
021242ece9 Fix unused variable warning for netconsole project 2023-04-16 01:25:39 +02:00
Kawe Mazidjatari
b8035120de Assign unused constructor parameter 2023-04-16 01:23:38 +02:00
Kawe Mazidjatari
4827a3cc84 Fix 'unreachable code' compiler warning 2023-04-16 01:23:11 +02:00
Kawe Mazidjatari
75b9c71fd7 Enable compiler warning level 4 for executable projects 2023-04-16 01:18:12 +02:00
Kawe Mazidjatari
e0e7adbed4 Rename 'ip' cvar global to avoid conflicts
Avoid shadowing conflicts due to short name.
2023-04-16 01:17:46 +02:00
Kawe Mazidjatari
9287f00841 Fixed performance bug in standalone netconsole
When unconnected, the frame loop would run as fast as it could. Moved thread sleeper at the bottom in the outer scope of the function to prevent this behavior in all cases.
2023-04-16 01:00:07 +02:00
Kawe Mazidjatari
096091e56f CConsole::LoadFlagIcons: Break out on failure 2023-04-16 00:41:48 +02:00
Kawe Mazidjatari
617b7b1948 Fix bug caused by compiler optimization
The 'private' server icon did not load in release builds due to the call to 'LoadTextureBuffer' getting optimized away by the use of the const qualifier. Removing the qualifier fixed the bug.
2023-04-16 00:40:44 +02:00
Kawe Mazidjatari
3d49d07953 NET_ReceiveDatagram: light code improvement 2023-04-16 00:36:30 +02:00
Kawe Mazidjatari
72a0399427 Add 'ip' cvar to SDK 2023-04-16 00:32:50 +02:00
Kawe Mazidjatari
abf74d71a0 Add missing definition for 'NET_Config' 2023-04-16 00:32:11 +02:00
Kawe Mazidjatari
fe15a1c745 Add 'NET_Config' to SDK
Signature matches among all builds between S0 and S3.
2023-04-16 00:30:29 +02:00
Kawe Mazidjatari
3882b64b91 Fixed several bugs in socket creator class
* Fixed 'connect' socket bug preventing connection to IPv4 addresses, by making the method used by the listen socket and connect socket configurator shared (dual stack was disabled on connect, but not on listen).
* Removed extraneous member from the 'CSocketCreator' class, this member was a copy of the 'netadr_t' input, but nothing ever was done with it.
2023-04-16 00:28:33 +02:00
Kawe Mazidjatari
2d3f2ba507 Fixed bug causing RCON server socket to only listen on IPv6
Ip address must be unspecified (::) to bind sockets properly.
2023-04-16 00:24:06 +02:00
Kawe Mazidjatari
cf610b7d6b Light improvements to client side RCON system 2023-04-16 00:22:21 +02:00
Kawe Mazidjatari
0b9e5f6e68 Light cleanup of the 'CNetAdr' class 2023-04-16 00:21:17 +02:00
Kawe Mazidjatari
fd5b840ba9 Light cleanup of the 'CNetAdr' class 2023-04-16 00:08:06 +02:00
Kawe Mazidjatari
7870f1557a Fix 'CLC_CmdKeyValues' exploit
Fix exploitation vector that could be performed on the game client to submit commands to other game clients connected to the same server, specifically the 'OnPlayerAward' command. Base_CmdKeyValues now only works when sv_cheats is enabled. SVC/CLC_CmdKeyValues subclass 'Base_CmdKeyValues', so these messages are 'fixed' as well.
2023-04-15 02:13:29 +02:00
Kawe Mazidjatari
0ffcca14ab Add 'sv_cheats' cvar to SDK 2023-04-15 00:18:13 +02:00
Kawe Mazidjatari
8611a0c607 Small logger system optimization
Only perform colorization operation for script errors when log level is at least that of the console.
2023-04-14 00:37:57 +02:00
Kawe Mazidjatari
dee5b36088 Fix bug in script print logger
Fixed bug causing script warnings/errors to not override the log level. Warnings/errors should always be printed to the console. This commit also fixes a bug that causes warnings/errors to not show in red/yellow colors in the imgui console when '-ansicolor' command line parameter isn't used. The imgui console always logs colors and does not rely on '-ansicolor', this is only for the external terminal window.
2023-04-14 00:30:50 +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
53e2ddb122 Fix compiler warning caused by signed/unsigned mismatch v2.2_rc4 2023-04-10 23:45:51 +02:00
Kawe Mazidjatari
350dd4fcca Bump cache version
Force full rebuild; a new signature was added.
2023-04-10 23:45:33 +02:00
Kawe Mazidjatari
2aa20fbf18 Fix compiler warnings
* Explicitly cast to types.
* Mark parameter unused in release.
2023-04-10 23:45:09 +02:00
Kawe Mazidjatari
c6915fcf42 Cleanup 'CHostState::Think'
Reordered code and cleanup preprocessor directives.
2023-04-10 23:11:52 +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
f37743e068 Significantly reduce CPU time in CEngine::Frame for dedicated
Significant reduction of CPU time in CEngine::Frame for the dedicated server, by assigning the ConVar 'fps_max' to the tickrate of the server.
2023-04-10 22:35:41 +02:00
Kawe Mazidjatari
b45055dafd Fix debug compile errors 2023-04-10 22:31:42 +02:00
Kawe Mazidjatari
d2e0621163 Fix bug in CGlobalVarsBase
Field 'm_flTickInterval' should be float, not int.
2023-04-10 22:30:57 +02:00
Kawe Mazidjatari
b75fb7913f Rename symbols 2023-04-10 19:14:59 +02:00
Kawe Mazidjatari
e77b301f2b Remove unused ConVar
No longer required.
2023-04-10 15:05:05 +02:00
Kawe Mazidjatari
e48623102f Write 'SVC_ServerTick' into snapshot buffer
This should be cheaper and more reliable than sending it as a separate net message.
2023-04-10 15:04:46 +02:00
Kawe Mazidjatari
6a69965b33 Improve 'bf_read' and 'bf_write'
* Implemented a proper initializer for the mask tables (s_nMaskTable has been removed).
* Implemented write methods in 'bf_write'. There are still some missing methods; there have to be added in later.
* Documented most functions.
2023-04-10 15:02:56 +02:00
Kawe Mazidjatari
4ecf58f61c Add additional bit utilities from SourceSDK 2023-04-10 14:59:36 +02:00