241 Commits

Author SHA1 Message Date
Kawe Mazidjatari
a8c5ed45fd Fix IAppSystem VFTable
Destruvtor is prepended on every class in-engine. Reflected in SDK. Also removed extraneous method from ICvar causing other methods below it to misalign after the IAppSystem change.
2023-02-06 02:15:01 +01:00
Kawe Mazidjatari
836839e6a5 Add completion logic for 'give' command
* Implemented class 'CAutoCompleteFileList' (features engine's implementation for 'AutoCompletionFunc').
* Added completion callback for 'give' command.
2023-02-05 23:01:01 +01:00
Kawe Mazidjatari
ddba8cf9b8 Install more robust 'map' completion callback
This one will list all maps, as maps should have a vpk file to be loaded correctly due to the way rpak files are formatted internally to be loaded/parsed.
2023-02-05 21:13:03 +01:00
Kawe Mazidjatari
87ff71675b Implement ICvar interface class
Reversed ICvar interface class. Has been tested and verified on assembly level.
2023-02-05 11:01:27 +01:00
Kawe Mazidjatari
b51baee6cd Correct vtable name
First vtable in the hierarchy of ConVar is the base table.
2023-01-31 23:09:22 +01:00
Kawe Mazidjatari
ca9143dde9 Add curl cvars for debugging 2023-01-30 00:04:11 +01:00
Kawe Mazidjatari
8ed5a3a695 Connect RCON to localhost by machine name
Connect to local host using machine name when ip is set to 'localhost'.
2023-01-29 17:12:33 +01:00
Kawe Mazidjatari
5f56c23af2 Compile CRConServer for gamesdk
RCON can now be used on the host game as well (previously dedicated exclusive).
2023-01-29 16:07:02 +01:00
Kawe Mazidjatari
b98eee0268 RCON system refactor and improvements
* Use game's CNetAdr RCON and socket creator.
* Add support for constructing host from [ip]:port format in the netconsole client.
* Pass 'netadr_t' parameter by reference to 'CSocketCreator::OnSocketAccepted'.
2023-01-29 15:24:24 +01:00
Kawe Mazidjatari
0e033cb755 Reimplementation of CNetAdr
This will replace 'CNetAdr2' and 'v_netadr_t'. The implementation is directly compatible with the structures in engine.
2023-01-29 13:59:34 +01:00
Kawe Mazidjatari
61684ddf87 Create cvar for global banned list queries
This was planned to be changed a long time ago. This change allows dedicated server users to disable the logic as well.
2023-01-26 21:20:11 +01:00
Amos
d76ed1098a Improve VFTable address logging
More standardized VFTable address logging.
2023-01-25 11:19:53 +01:00
Kawe Mazidjatari
a618990937 Detour code refactor
This change was planned for a long time. This moves all REGISTER calls to a single translation unit, this is required as we currently added a very dirty workaround for not registering duplicates by checking if VFTable pointer was already present in the vector... Registering from single translation unit prevents duplicate instances that gets created if header is included by more cpp files.
Reworking this reduced 100kb+ of compiled code. This commit also reworked the way functions/variables/constant gets logged with their addresses; the new code formats them on the fly, and allows for resize at any time. Formatting is no longer required by programmer.

TODO: currently there are some compile errors for dedicated and client dll's. These will be resolved very soon as they need to be properly worked out still (server & client only stuff needs to be properly split). Use the 'main' (stable) branch for the time being if you need to compile these dll's.
2023-01-25 02:26:52 +01:00
Kawe Mazidjatari
e281aea990 Fix client.dll/dedicated.dll compile errors 2023-01-24 18:39:12 +01:00
Kawe Mazidjatari
19447f1122 Improve debug draw depth test toggle logic
* Add box depth test cvar from engine for 'CBaseAnimating::DrawServerHitboxes'.
* Use noDepthTest field from OverlayBox_t instead of the cvar.
2023-01-24 12:05:09 +01:00
Kawe Mazidjatari
888989d2b3 Fully working implementation of 'sv_showhitboxes'
Setting 'sv_showhitboxes' to 0 will enable it on everything deriving from CBaseAnimating, and having a valid studiohdr/hitbox. -1 means off, value > 0 will select entity by index (value of 'sv_showhitbox').
2023-01-24 00:53:45 +01:00
Kawe Mazidjatari
4ebe031341 Disable BHit raytrace z-buffer by default 2023-01-22 12:28:48 +01:00
Kawe Mazidjatari
e8a5bbcb9f BHit_f: split server and client rendering 2023-01-22 12:12:06 +01:00
Kawe Mazidjatari
a281768ac9 BHit performance improvements
Use ray trace directly instead of build-in drawline command.
2023-01-22 12:09:12 +01:00
Kawe Mazidjatari
4710b51fa3 Experimental bot simulation implementation
Simulate bot user commands on the server. The simulation system is experimental and only runs if cvar 'sv_simulateBots' is set, and bots are created on the server.
2023-01-20 01:23:08 +01:00
Amos
68f197dcef Initial fake client (bot) implementation
New bots can be added using 'sv_addbot <name> <teamid>'.
2023-01-16 15:52:33 +01:00
Kawe Mazidjatari
34fddd52a8 Add cvar/command flag tooltip
Show a more detailed description of all flags set on cvar/command when user hovers its mouse over the flags texture.
2022-12-29 13:30:33 +01:00
Kawe Mazidjatari
1371bb1f38 Fix typo 2022-12-26 17:01:14 +01:00
rexx
3c3e1c46df Add pak_listtypes command 2022-12-22 21:44:38 +00:00
Kawe Mazidjatari
2501c37044 Globally convert all byte patterns to strings
These get reconverted to masked byte patterns at runtime. With the signature map cache system, this will only happen when building the cache.
2022-12-01 22:44:55 +01:00
Kawe Mazidjatari
25aa8f02c0 Update CMemStack to 64bit
Use unsigned 64bit integer types for all size types, and use 64bit format specifier. Also use 64bit pointer types/value assignments. The virtual class and overrides no longer exist, these have been commented.
2022-11-29 01:45:24 +01:00
Kawe Mazidjatari
3a4a5a08f8 Add CMemStack class 2022-11-29 00:01:47 +01:00
Kawe Mazidjatari
edeb8ea586 Add Valve Source SDK utl classes
These have pending modifications/implementations.
2022-11-28 23:54:38 +01:00
Kawe Mazidjatari
00deea0ccb Improve Audio logger color
A more vibrant orange.
Also improved consistency with RUI notify overlay.
2022-11-28 23:13:18 +01:00
Kawe Mazidjatari
6e1f15933f CUtlRBTree int64 promotion
Promote parameter types to int64 as CUtlMemory has been modified to use int64 for size types.
2022-11-27 22:26:02 +01:00
rexx
6695a9bdaf add MilesQueueEventRun debug print 2022-11-27 20:44:17 +00:00
rexx
b15b876eed Revert "add more miles debug hooks"
This reverts commit feeaf5c54536a6ff7dae385314f9036ff45c4cd2.
2022-11-27 20:26:58 +00:00
rexx
feeaf5c545 add more miles debug hooks 2022-11-27 20:14:41 +00:00
Kawe Mazidjatari
9e7495e407 Added new logger types (AudioSystem & VideoSystem)
These loggers are to be used for hooking and logging Miles Audio and Bink Video systems.
2022-11-27 10:19:23 +01:00
Kawe Mazidjatari
277e05b2b8 Improve logging throughout SDK
Used proper enum for context. The low level tier1 stuff should print in COMMON.
Also added newlines where missing, the logging system will undergo a change where a newline will only be appended if we are logging in the same context without a newline.
2022-11-25 23:03:56 +01:00
Kawe Mazidjatari
4ba88963ff Fix bugs and many compiler warnings
* Promoted size types in CUtlBuffer to int64.
* Fixed bug where CUtlBuffer::GetPtr returns a 64bit pointer that was promoted from a 32bit integral type.
* Use int64/size_t for anything strlen, pointer subtraction, etc..
* Removed invalid structure alignment declarations.
2022-11-24 15:41:52 +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
Kawe Mazidjatari
9c1efe20ad Remove ConVar and ConCommand singletons
Extraneous singletons.
2022-11-18 22:10:20 +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
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
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
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
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
a9244cd8ea Set VPK default workspace to 'platform/' 2022-11-05 00:11:43 +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
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