2488 Commits

Author SHA1 Message Date
Kawe Mazidjatari
4e396728c3 Fix typos 2023-02-21 17:56:56 +01:00
Kawe Mazidjatari
3f2216337e Add completion for pak decompress
* Renamed 'rtech_decompress' to 'pak_decompress'.
* Added completion func for 'pak_decompress'.
2023-02-19 13:38:06 +01:00
Kawe Mazidjatari
7649d16e6a Rename 'CAutoCompleteFileList'
Rename 'CAutoCompleteFileList' to 'CBaseAutoCompleteFileList' (official name).
2023-02-19 13:26:38 +01:00
Kawe Mazidjatari
3e3c823c55 Change default VPK build directory 2023-02-19 10:24:15 +01:00
Kawe Mazidjatari
dd95eee491 Rename 'Con_NPrintf' cvars
A more appropriate name and description for 'Con_NPrintf'.
2023-02-19 10:23:35 +01:00
Kawe Mazidjatari
8965d6f101 Error/Warning/Con_NPrintf log hook refactor
* Warning now only logs if error level < 5.
* Warning buffer size has been increased to '10000' (internal buffer size).
* Error is now hooked as well.
* Error buffer size has been increased to '4096' (internal buffer size).
* Con_NPrintf has been refactored; 'cl_showhoststats' has been removed.
* Con_NPrintf buffer size has been increased to '4096' (MAXPRINTMSG).
* CTextOverlay::Con_NPrintf now checks the first byte in the character buffer before rendering anything, and sets the first byte to a terminating null character after rendering. This fixes the bug causing the host_speeds overlay to be still drawn while the cvar 'host_speeds' was disabled.
2023-02-19 09:51:46 +01:00
Kawe Mazidjatari
9e61db4b60 Hook 'Host_Error'
'Host_Error' messages were never getting logged until now.
2023-02-19 09:43:12 +01:00
Kawe Mazidjatari
020986fc3b Remove unnecessary newline
Most error messages have newlines. If they are absent, they get appended automatically.
2023-02-19 00:44:43 +01:00
Kawe Mazidjatari
ad1f83523e CHostState improvements
Mapped out all members, also fixed the initialization of members. Some fields were never getting initialized, and m_iCurrentState was initialized improperly.
2023-02-18 19:18:00 +01:00
Kawe Mazidjatari
19d21300a3 Use cached ImGui IO reference 2023-02-18 15:50:12 +01:00
Kawe Mazidjatari
c253fd8b44 Update console code
'SetConsoleBackgroundColor' takes a DWORD.
2023-02-18 15:49:04 +01:00
Kawe Mazidjatari
526179878d Fix client.dll compile error
Must be included in init.cpp.
2023-02-18 13:22:34 +01:00
Kawe Mazidjatari
68ae16d93a Fix bug in 'Detour_LevelShutdown'
Pointer in array never got nulled after getting freed, causing undefined behavior. Also made a dedicated function for clearing a NavMesh slot by hull.
2023-02-18 13:21:31 +01:00
Kawe Mazidjatari
3e246a9d27 CServer improvements
* Added new member 'm_nSpawnCount'.
* Added hook for 'CServer::RunFrame'.
* Abstract class 'IServer' no longer exists in this engine, inherit from 'IConnectionlessPacketHandler' instead (see RTTI in engine executable).
2023-02-18 11:42:36 +01:00
Kawe Mazidjatari
270cd8f1e7 Activate hook for server side CPU statistics 2023-02-18 00:32:29 +01:00
Kawe Mazidjatari
74eb203f2f Client: CPU statistics update logic
Implements the client side CPU statistics logic. An additional check has been added which checks if 'SVC_ServerTick::m_NetTick.m_nCommandTick' equals '-1'. This instructs the client to only update the remote statistics; actual tick members won't get updated as this causes simulation problems.
2023-02-18 00:31:57 +01:00
Kawe Mazidjatari
872e33887a Server: CPU statistics update logic
Implements the server side CPU statistics update logic. In the retail product 'SVC_ServerTick' is only send during 'CClient::ActivatePlayer' and 'CClient::SendServerInfo', which is only called during/after connect, but not during the game. The new implementation sends server CPU statistics to the client every time the CPU usage has changed. This is indicated using the '-1' value in the 'SVC_ServerTick::m_NetTick.m_nCommandTick' member variable.
2023-02-18 00:24:02 +01:00
Kawe Mazidjatari
43dd1ea813 Remove extraneous include 2023-02-18 00:10:01 +01:00
Kawe Mazidjatari
1e8d872908 Add host frametime globals to SDK
Added:
* host_frametime_unbounded
* host_frametime_stddeviation
2023-02-18 00:08:10 +01:00
Kawe Mazidjatari
adb2ed60a4 Add 'sv_stats' cvar to SDK
Server CPU statistics.
2023-02-18 00:06:24 +01:00
Kawe Mazidjatari
367b2cf5bc Renames and new setters for CNetChan
* Renamed hooking class to 'VNetChan'
* Added new setters for setting the remote frame times, and the remote server CPU statistics.
2023-02-18 00:05:55 +01:00
Kawe Mazidjatari
eec9c21648 Implement SVC_ServerTick properly
* Message handler is now part of the CNetMessage base class.
* SVC_ServerTick has been implemented, and is ready for use.
2023-02-18 00:03:30 +01:00
Kawe Mazidjatari
2ed56d7317 More mapped out fields for server and client class 2023-02-17 23:59:37 +01:00
Kawe Mazidjatari
fb00aa5c37 Force 'CMaterialSystem::IsMaterialInternal' no inline
This seems to work a lot better for our crash handler. 'CMaterialSystem::IsMaterialInternal' still needs to be removed entirely in the future!
2023-02-17 23:56:56 +01:00
Kawe Mazidjatari
1e0248a442 Fix command quota warning message
Fix command not getting logged properly when user exceeds quota.
2023-02-17 23:55:27 +01:00
Kawe Mazidjatari
bee83bc9ac Fixup SVC classes
The message handler is a field in the structure, it might belong to CNetMessage.
2023-02-15 21:44:09 +01:00
Kawe Mazidjatari
7f127ddcbe Rename 'nettick_s' members 2023-02-15 21:43:15 +01:00
Kawe Mazidjatari
a0cc101b29 Rebuild 'Host_Status_PrintClient'
This function has been rebuild by popular demand. Its the exact same as the one found within the executable but it logs the client's nucleus id as well, which is useful for identifying a cheater and taking necessary actions.
2023-02-15 20:54:09 +01:00
Kawe Mazidjatari
eaf1e3632e Implement 'COM_FormatSeconds' 2023-02-15 20:50:12 +01:00
Kawe Mazidjatari
06698bea33 Implement 'CNetChan::GetTimeConnected'
'CNetChan::GetConnectTime' has been removed in favor of 'CNetChan::GetTimeConnected'.
2023-02-15 20:49:14 +01:00
Kawe Mazidjatari
fc1a773836 Add 'g_NetTime' to SDK
Official name = 'net_time'.
2023-02-15 20:47:58 +01:00
Kawe Mazidjatari
559f15a459 Fix compile errors
This belongs to commit 8550d7a8.
2023-02-15 20:46:37 +01:00
Kawe Mazidjatari
1d82fd4903 Add 'FORCENOINLINE' macro 2023-02-15 17:53:15 +01:00
Kawe Mazidjatari
074ec37756 Add SVC_ServerTick
Class fully mapped out.
2023-02-15 17:52:49 +01:00
Kawe Mazidjatari
8550d7a865 Rename 'TickUpdate' to 'nettick_t' and move to public
Renamed, and moved to public. also added additional static assertions to avoid alignment mistakes in the future.
2023-02-15 17:52:25 +01:00
Kawe Mazidjatari
ccf221fd6e CNetChan fixup
* Renamed member variable; m_bUnkTickBool is m_nServerCPU.
* Removed member variable 'm_bRetrySendLong'; does not exist in s3.
2023-02-15 17:35:47 +01:00
Kawe Mazidjatari
3d5ad71f25 Force full rebuild of SMap
Force rebuild due to invalid RVA in shipped cache map.
2023-02-13 23:53:53 +01:00
Kawe Mazidjatari
a20b66e93c CMDLCache error handling code improvements
* Use unordered_set for mdl handles, and use insertion logic in 'CMDLCache::IsKnownBadModel' to determine if it already exists or not.
* Only set 'old_gather_props' to true if its false instead of forcing it every time 'mdl/error.rmdl' is obtained (this has to be properly fixed still in the future!).
2023-02-13 23:50:37 +01:00
Kawe Mazidjatari
0b85476011 Belongs to the previous commit 2023-02-13 23:47:12 +01:00
Kawe Mazidjatari
9a8db42575 Improve and fix 'CStudioHdr'
* Fixed crash that occurred due to misaligned member 'm_pMdlCacheVTable' which has been retyped to 'CMDLCache*' and renamed to 'm_pMDLCache' (actual object).
* Added mapped out member 'm_pModelName'.
2023-02-13 23:46:37 +01:00
Kawe Mazidjatari
5806f719c6 Should be u8string v2.2_rc3 2023-02-12 23:32:58 +01:00
Kawe Mazidjatari
4d68a2edbe Fix deadlock when file entry is truncated
* Fixed endless loop when condition is hit.
* Fixed file name not being formatted correctly.
2023-02-12 23:28:24 +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
46ddaf9b01 Add ability to deselect a map in the SDK launcher 2023-02-12 20:30:35 +01:00
Kawe Mazidjatari
246312840b Force full rebuild of SMap
Force full rebuild due to changed/added/removed signatures.
2023-02-12 20:07:27 +01:00
Kawe Mazidjatari
ae8a6222fe Update license file
Add curl license in place of 'yhirose HTTP library', which has been replaced with curl.
2023-02-12 20:05:59 +01:00
Kawe Mazidjatari
89978d795e Add missing include guards
Last few files which do not have include guards.
2023-02-12 19:50:45 +01:00
Kawe Mazidjatari
33b8fcd825 Fix compiler output paths
Some output paths were wrong.
2023-02-12 19:35:10 +01:00
Kawe Mazidjatari
cbed704bab Performance improvements for str tools
Improve performance for 'StringToMaskedBytes' and 'PatternToMaskedBytes' by appending characters as immediate (char) values instead of pointers.
2023-02-12 19:05:34 +01:00
Kawe Mazidjatari
a97915ed64 Fix many compiler warnings
Verbose warnings about implicit conversions from double to float.
2023-02-12 18:17:19 +01:00