1681 Commits

Author SHA1 Message Date
Kawe Mazidjatari
4b1c5dd5a3 RCON system light refactor
* Used 'htonl'/'ntohl' for constructing the length prefix.
* Used static socket/address members instead of pointers.
* Used const qualifier where possible.
* Changed length prefix field type to 'u_long'.
* Removed extraneous include.
* Properly escaped percentage characters on the RCON game client for the ImGui console.
2022-11-14 21:00:41 +01:00
Kawe Mazidjatari
9533afc628 Add new 'shortcut' buttons to host panel
* Added "Rebuild AI Network" (rebuilds the AIN file).
* Added "NavMesh Hot Swap" (hot reloads the navmesh files).
* Added "AI Settings Reparse" (reparses ai settings on the server and client).
2022-11-14 01:04:01 +01:00
Kawe Mazidjatari
3b5d6ec910 Use more consistent types
* Use more consistent types in the AI network manager.
* Use the server global to obtain level name.
2022-11-14 01:01:28 +01:00
Kawe Mazidjatari
926436aedf Build debug binaries into game dir 2022-11-14 00:58:26 +01:00
Kawe Mazidjatari
75713d1b52 Fix client.dll compile 2022-11-14 00:37:12 +01:00
Kawe Mazidjatari
11fa1c5119 Add case insensitive search for developer console input field
This has been requested by a user. This change will allow for searching convars from partial input regardless of the case.
2022-11-13 23:44:30 +01:00
Kawe Mazidjatari
cf1adef1a2 Add FCVAR_RELEASE unknown and extended flag textures
If FCVAR_RELEASE but not restricted by context, then display this texture in the console suggestion window.
2022-11-11 20:12:20 +01:00
Kawe Mazidjatari
65ba543ed2 Update flag textures
Set red and blue color to match that of other textures
2022-11-11 18:39:01 +01:00
Kawe Mazidjatari
525999be40 Trim value from ConVar among with the delimiter
Trim anything past the space/semicolon character as well, this is required for CCvar::FindVar(...).
2022-11-11 01:19:49 +01:00
Kawe Mazidjatari
24a4097cef Improve string trimming logic
Add option to trim anything before/after the criteria.
2022-11-11 01:17:11 +01:00
Kawe Mazidjatari
b81566604f Fix edge case where user could still enter tilde/space characters as first characters in console
This could be done by entering a character in the console (setting m_nInputTextLen > 0), then selecting and replacing valid 'first' character out for a tilde/space. This fixes the issue.
2022-11-10 22:03:27 +01:00
Kawe Mazidjatari
5dd5f2ad11 Fix issue caused by iData->BufTextLen always being NULL in ImGuiInputTextFlags_CallbackCharFilter
iData->BufTextLen is always 0 in the ImGuiInputTextFlags_CallbackCharFilter event. ImGuiInputTextFlags_CallbackAlways is called before ImGuiInputTextFlags_CallbackCharFilter in the same frame, so we can obtain the lenght from there and perform the test to discard unwanted characters from the input field.
2022-11-10 22:01:34 +01:00
Kawe Mazidjatari
5564c4f29b CConsole: more robust input character filtering
Filter the back quote, tilde and space character properly.
2022-11-10 21:19:17 +01:00
Kawe Mazidjatari
ab7262fec5 Update default/retail startup config files 2022-11-10 16:16:50 +01:00
Kawe Mazidjatari
3511aff224 Execute "bind.cfg" on startup
Users could put custom binds in here.
I also unbound all dev-only binds by default to suppress warnings or prevent issues.
2022-11-10 15:42:27 +01:00
Kawe Mazidjatari
32a158903f Rename 'cl_showconsole' and 'cl_showbrowser' to 'toggleconsole' and 'togglebrowser'
Suppress engine warnings due to missing commands (stripped for retail but still bound to key).
2022-11-10 15:36:04 +01:00
Kawe Mazidjatari
4f2ed4ae75 Rename 'g_pMatSystemSurfaceReference' to 'g_pVGuiSurface' 2022-11-10 15:34:41 +01:00
Kawe Mazidjatari
93bca826ef load imgui configs from 'cfg/imgui/*' instead 2022-11-10 15:33:35 +01:00
Kawe Mazidjatari
91052d8e9e Add more InputSystem methods 2022-11-10 15:32:56 +01:00
Kawe Mazidjatari
5c92fde569 Rename no map title to 'menu_main' 2022-11-10 11:59:29 +01:00
Kawe Mazidjatari
189e6602a6 Rename 'vpk/englishserver_mp_common.bsp.pak000_dir.vpk' to 'vpk/englishserver_mp_lobby.bsp.pak000_dir.vpk' 2022-11-10 11:47:36 +01:00
Kawe Mazidjatari
0c13ca4e3f Only run threaded bone setup when we don't run the listen server
The Season 3 versions of the executable deadlock when threaded bone setup has been enabled on the client while the listen server has ran at least once during the process lifetime.
2022-11-10 11:47:02 +01:00
Kawe Mazidjatari
95a544cdb9 Fix progressively increasing CPU time in PurgeServerOverlays() when enable_debug_overlays is unset
The default engine implementation of DrawAllOverlays will return early when cvar 'enable_debug_overlays' is false. The problem with this is that overlays are still added, which fills memory unnecessarily and also increases CPU time as they never decay, which overloads the function 'PurgeServerOverlays'. This became evident after profiling the application. Numerous people reported the bug.
2022-11-10 02:40:34 +01:00
Kawe Mazidjatari
a92c72afc6 Improve string variable readability in CPakFile::LoadAsync 2022-11-10 01:22:00 +01:00
Kawe Mazidjatari
6672d15d9f Bring more context to 'eDLL_T' enumerants 2022-11-10 01:21:18 +01:00
Kawe Mazidjatari
7244520442 CBaseFileSystem::VMountVPKFile light cleanup 2022-11-10 01:20:45 +01:00
Kawe Mazidjatari
a8fd5a24f5 Add flag textures and logic for 3 or more flags
Only check if FCVAR_DEVELOPMENTONLY or FCVAR_CHEAT is set and return a blue/red colored checkered texture. Return a rainbow checkered if 3 or more flags are encountered which are not indexed. Return half texture if 2 flags are encountered, but the second bit is not indexed.
2022-11-10 01:17:53 +01:00
Marvin D
d00aaa933d CRenderView init, GetWorldMatrixForView()
* Fixed .gitignore for root /game/
* Fixed bug in WalkVTable where it would offset self.
* General clean up: VAR -> CON, CON -> VAR
2022-11-10 00:53:12 +01:00
Marvin D
4af22ede90 fix compilation. 2022-11-09 23:37:33 +01:00
Kawe Mazidjatari
85d0d5fa9a Load plugins from 'bin/x64_retail/plugins' 2022-11-08 21:17:40 +01:00
Kawe Mazidjatari
dcb909cab9 Only attempt to load .VMT files from the disk if VPK mode is 0
Only load from disk if mode is 0. Mode can be set to 0 using the '-novpk' launch parameter.
2022-11-08 01:11:14 +01:00
Kawe Mazidjatari
44abceb78a CEngineAPI: Split VPK initialization code into separate function 2022-11-07 23:49:05 +01:00
Kawe Mazidjatari
f341919aad Properly initialize VPK and cache system for the dedicated server
server loads "vpk/server_mp_lobby.bsp" instead of "vpk/client_mp_common.bsp" and "vpk/client_frontend.bsp". Also removed the old hack we used to patch string constants to format VPK string paths as we have a proper implementation now using CEngineAPI::SetStartupInfo.
2022-11-07 23:11:12 +01:00
Kawe Mazidjatari
39ee5ddd6d Add '-novpk' command lien option
When '-novpk' is passed, the engine won't use the filesystem cache, and won't mount any VPK's (all files could be loaded from the disk essentially, the VPK files will be ignored).
2022-11-07 22:28:59 +01:00
Kawe Mazidjatari
6266549cd7 CEngineAPI::SetStartupInfo rebuild
Full rebuild of assembled function "CEngineAPI::SetStartupInfo". The assembly seems to match original function after rebuild. Does NOT support S1 yet, because TRACEINIT is inline in S1.
2022-11-07 22:25:20 +01:00
Kawe Mazidjatari
7be85c03a7 Implement '-nodfs'
Allow skipping DFS initialization.
2022-11-07 19:29:55 +01:00
Kawe Mazidjatari
7a065ccd12 Parse/reparse map list on playlists file initialization.
Map list will now initialize with the playlist. User could also reparse the map list by reparsing the playlists file.
2022-11-06 14:21:27 +01:00
Kawe Mazidjatari
dc8ad3dd53 Log all mounted/unmounted VPK files
* Log all mounted/unmounted VPK files.
* Add command for unmounting a VPK file.
* Increased logging buffer size to 4096 for all loggers that weren't updated to this yet.
2022-11-06 12:21:21 +01:00
Kawe Mazidjatari
01b67fec8a Remove deprecated information in worldsize.h 2022-11-05 23:46:39 +01:00
Kawe Mazidjatari
811ecade86 Replace CServer::Think with CServer::FrameJob
Actual hook where we could also run anything in the server frame thread (the earliest function where equality to server thread id could be performed).
2022-11-05 00:12:45 +01:00
Kawe Mazidjatari
a9244cd8ea Set VPK default workspace to 'platform/' 2022-11-05 00:11:43 +01:00
Kawe Mazidjatari
8147431b0f Rename Detour_Free() to Detour_LevelShutdown()
Added the missing call to v_Detour_LevelInit(), which was removed for debugging purposes.
2022-11-05 00:11:17 +01:00
Kawe Mazidjatari
4bd164a535 NavMesh hot swap system improvements
* Check if server is active in command callback before attempting to hot swap.
* Hook 'v_Detour_LevelInit', and log NavMeshes that failed to load.
* Split free/destroy logic into separate function.
* Created constants for NavMesh and AI Network paths/extensions.
* Added performance profiler for hot swap logic in command callback.
* Renamed "navmesh_reload" to "navmesh_hotswap".
* "navmesh_hotswap" is now development only.
2022-11-03 17:12:22 +01:00
Marvin D
2fc0bea3a2 increase NET_PrintFunc buf.
Game expects 2048 characters.
2022-11-03 10:46:01 +01:00
Kawe Mazidjatari
ba252c8e98 Implement logic for hot swapping NavMesh
The new command 'navmesh_reload' hot swaps the current NavMesh for all hulls in memory, with that of the 'new' files on the disk. The memory of the old NavMesh gets freed and destroyed.
2022-11-03 10:44:59 +01:00
Kawe Mazidjatari
4ebdc5c513 CServer::AuthClient: cache pChallenge->m_nNucleusID 2022-11-03 02:38:49 +01:00
Kawe Mazidjatari
8403362f70 Update playlists file 2022-11-03 02:33:03 +01:00
Kawe Mazidjatari
40566235e0 Server authentication code improvements
* Added validity checks for player names, they must be UTF-8 encoded, else game clients will crash attempting to set non-UTF-8 player names in RUI.
* CServer::RejectConnection now takes a 'v_netadr_t*', previously it was 'user_creds_s*', which worked as 'v_netadr_t' is the first member in 'user_creds_s'.
* Programmer must now manually pass a character buffer to 'v_net_adr::GetAddress(...)'.
2022-11-03 02:30:57 +01:00
Kawe Mazidjatari
f27ff874c2 Add hexadecimal prefix to NavMesh checksum debug 2022-11-03 02:24:04 +01:00
Kawe Mazidjatari
96f243d519 Light squirrel code cleanup
Renamed 'Script_GetContextObject' to 'Script_GetScriptHandle'.
2022-11-03 02:23:00 +01:00