1545 Commits

Author SHA1 Message Date
Kawe Mazidjatari
69cd41881e Move common VPK types to dedicated public header 2022-11-23 12:11:53 +01:00
Kawe Mazidjatari
cb0937ed04 Add 'KeyValues::LoadFromFile' to SDK
Added 'KeyValues::LoadFromFile' to the SDK among with 'KeyValues::UsesEscapeSequences', and delete KeyValue memory after GameInfo.txt init.
2022-11-23 10:34:11 +01:00
Kawe Mazidjatari
3c45ea3d2f Compile utlbuffer.cpp with projects 2022-11-23 10:32:23 +01:00
Kawe Mazidjatari
a82674bbc8 Add 'KeyValues::RecursiveSaveToFile' to the SDK
Relies on the engine's implementation of 'KeyValues::RecursiveSaveToFile'. The IFileSystem methods have been fixed up with the CUtlBuffer class rebuild in which we could call these to write a KV memory structure as a file to the disk.
2022-11-22 09:04:28 +01:00
Kawe Mazidjatari
843cc6f4ca A more complete implementation of the CUtlBuffer class
Added the implementation file and changed more methods to be 64 bit.
2022-11-22 08:57:33 +01:00
Kawe Mazidjatari
23af39e67b Make CUtlBuffer members and methods 64bit
In Apex, the CUtlBuffer members seem to be signed 64bit instead. Changed type accordingly to align SDK structure with that of the engine. Added additional new fields that have been added to Apex.
2022-11-21 23:33:22 +01:00
Kawe Mazidjatari
36fbac0b17 Add CUtlBuffer and CByteSwap from Valve Source SDK 2022-11-21 23:13:06 +01:00
Marvin D
d59d798d13 datamap_t init.
* Get datamap vars from class datamap.
2022-11-19 03:16:49 +01:00
Kawe Mazidjatari
9c1efe20ad Remove ConVar and ConCommand singletons
Extraneous singletons.
2022-11-18 22:10:20 +01:00
Kawe Mazidjatari
4bf0e2f544 Add camera range culling logic to 'CAI_Utility::DrawAIScriptNetwork'
Uses the same camera range cvar used by the NavMesh renderer: 'navmesh_debug_camera_range'. This allows for rendering them nicely on top of the NavMesh.
2022-11-17 20:49:23 +01:00
Kawe Mazidjatari
a9ac75cfee Improve VPK pack/unpack callback code
* Use CFastTimer class for logging performance.
* Don't create unnecessary threads for packing/unpacking.
2022-11-17 20:41:34 +01:00
Kawe Mazidjatari
14f4ab5e02 Set 'ai_script_nodes_draw_nearest' by default to '1' 2022-11-17 20:38:29 +01:00
Kawe Mazidjatari
bfa875394f Definitions for 'fs_packedstore_max_helper_threads' 2022-11-17 20:37:55 +01:00
Kawe Mazidjatari
8c7b58b9df Add convar for adjusting LZHAM compressor max helper threads 2022-11-17 20:37:12 +01:00
Kawe Mazidjatari
90d87897f8 Improve consistency within the LZHAM library
Make CRC32 consistence with ADLER32
2022-11-17 20:35:43 +01:00
Marvin D
5532a5ff35 SendPropType impl. 2022-11-17 17:51:37 +01:00
Kawe Mazidjatari
34d8ea578a Improve consistency throughout packedstore class
No modifications to the existing logic have been performed. Some parameter names have been renamed to improve code readability and maintainability.
2022-11-16 00:54:51 +01:00
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