143 Commits

Author SHA1 Message Date
Kawe Mazidjatari
4ecf58f61c Add additional bit utilities from SourceSDK 2023-04-10 14:59:36 +02:00
Kawe Mazidjatari
9f428f1567 Move tier0 lib headers to public
This commit does not change any logic or behavior of the code.
2023-04-06 23:50:48 +02:00
Kawe Mazidjatari
dbe1850ec1 Add LZSS implementation to SDK 2023-04-05 21:38:28 +02:00
Kawe Mazidjatari
5056d8f040 Move interface types to public header 2023-04-01 01:05:43 +02:00
Kawe Mazidjatari
f9c5986245 Upgrade Dear ImGui to 1.89.4
Upgrade and light restructure of ImGui directory.
2023-03-29 00:19:19 +02:00
Kawe Mazidjatari
47aabf244b Remove redundant tier1 files
These files are no longer necessary.
2023-03-28 01:30:09 +02:00
Kawe Mazidjatari
fd7e981e8c Upgrade SpdLog library to 1.11.0
* Upgrade SpdLog library to 1.11.0.
* Compile SpdLog as static library.
2023-03-18 13:34:43 +01:00
Kawe Mazidjatari
3db039b7d3 Compile utlstring 2023-03-17 00:14:28 +01:00
Kawe Mazidjatari
0734d56fe2 Add reversed 'CNetKey' class
Confirmed size, mostly unknown still. But some of this seems to be data related to OpenSSL.
2023-02-12 02:15:58 +01:00
Kawe Mazidjatari
ff597ae6ad Add thirdparty folder to project includes 2023-02-07 00:10:48 +01:00
Kawe Mazidjatari
45ae9add6c Add missing includes to project filters 2023-02-06 23:58:42 +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
34f69a5b1e Move crashhandler implementation to tier0 2023-01-31 22:13:40 +01:00
Kawe Mazidjatari
f0512d7f92 Add 'CAppSystemGroup::Destroy' callback
* Add hook for 'CAppSystemGroup::Destroy'.
* Moved 'IAppSystem.h' header file to public.
2023-01-30 21:22:17 +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
500a7c1925 Finish libcurl implementation
Master server queries now use SSL.
2023-01-26 20:06:48 +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
66ef9fb6a0 Fix crash in hitbox drawing code and light restructure
* Fix null pointer dereference crash in server hitbox drawing code; implemented a proper getter for CStudioHdr.
* Moved 'baseentity.h/cpp' to 'game/server/' instead.
* Overall light cleanup.
2023-01-23 23:21:29 +01:00
Kawe Mazidjatari
07ef57536d Add modelinfo vftable pointers 2023-01-22 16:48:16 +01:00
Kawe Mazidjatari
9903ed2597 Add bsp flags from source sdk 2023-01-21 16:38:55 +01:00
Kawe Mazidjatari
7b669ea8c6 Engine trace cleanup
Separate into different files to make it easier for other classes to access.
2023-01-20 17:20:50 +01:00
Kawe Mazidjatari
dcf05a0adf CClientEntityList reversal
Slightly reversed CClientEntityList while looking around its singleton.
2023-01-20 00:28:49 +01:00
Kawe Mazidjatari
82c914c2fd Detour 'Physics_RunThinkFunctions'
Hook will be used to run simulation for bots.
2023-01-19 22:53:45 +01:00
Kawe Mazidjatari
05748e6184 Add client movehelper to SDK
Structure and vftable align 100%.
2023-01-19 19:39:15 +01:00
Kawe Mazidjatari
754c986e3d Add server movehelper to SDK
Initial implementation of server movehelper. IMoveHelper interface class is fully reversed and aligns with implementation in engine. CMoveHelperServer is also reversed, excect for CGameTrace, though this isn't necessary for now.
2023-01-19 18:52:46 +01:00
Kawe Mazidjatari
afe8efbc2a Add CUserCmd class to SDK
Implemented CUserCmd to SDK. Constructor resets the class using the game's 'Reset' implementation as the majority of the structure is unknown.
2023-01-19 16:11:48 +01:00
Kawe Mazidjatari
54f08bd887 Work-in-progress user command executor
* Added some getters in 'CBaseEntity' and 'CServerNetworkProperty'.
* Implemented 'CPlayer::SetTimeBase'.
* WIP implementation of 'CPlayer::RunNullCommand'.
2023-01-19 15:25:45 +01:00
Kawe Mazidjatari
1cf03355a5 Light cleanup and work for future
Moved some structures around and added ehandle headers.
2023-01-19 02:03:36 +01:00
Amos
b63765e1dc Finished CPlayer inheritance 2023-01-18 12:39:18 +01:00
Kawe Mazidjatari
3ed423543e Add more entity structures to the SDK
Stuff will be separated properly very soon.
2023-01-18 01:34:40 +01:00
Kawe Mazidjatari
217bbc8ea1 Add new work-in-progress entity structures to SDK
Thanks to rexx for the structures.
2023-01-18 00:46:17 +01:00
Kawe Mazidjatari
21f4d0fa07 Initial working bots implementation
* Changed 'CClient' handle time to 'edict_t' which is an alias of 'uint16_t'.
* Changed 'g_pServerGameDLL' and 'g_pServerGameClients' init (obtain from factory instead).
* Use interface version macro's for obtaining factory pointers instead.
* Added 'g_pServerGameEntities'.
2023-01-16 21:09:21 +01:00
Kawe Mazidjatari
b4383478d1 Initial refactor of the CCrashHandler class
* Fixed recursive call.
* Format file similarly to Respawn's.
* Reduced output code size.

TODO:
* Call crashmsg.exe.
* Add build and system information.
2022-12-26 20:11:37 +01:00
Rika
10c82e7e64
Model fixup (#91)
* fix header, flags, and add rest of major structs

* minor type swap

* bone flags because there are new ones

* forgor this

* Add compressed vector types.

* fix bitfield sizes

* Fix compilation.

Co-authored-by: Marvin D <41352111+IcePixelx@users.noreply.github.com>
Co-authored-by: rexx <67599507+r-ex@users.noreply.github.com>
2022-12-26 01:42:26 +01:00
Marvin D
37a50c92b8 VectoredExceptionHandler init.
* Only gets compiled in for release builds.
* Attaches on gamesdk init, so should catch everything on dll setup also.
* Fake PDB parsing still needs to be done.
2022-12-23 02:56:40 +01:00
Marvin D
ef256618f6 CVTableHelper class for easier RE.
* THIS IS NOT SUPPOSED TO BE USED WITH SHIPPING CODE!
* This is used for a quick way to call virtual functions for reverse engineering and rebuilding big functions, upon successful rebuild, implement needed VTables accordingly.
2022-12-09 01:15:42 +01:00
Kawe Mazidjatari
ebf7bb5e0b Fix engine bug regarding forcing application borders
In Respawn's engine, the '-forceborder' command line parameter does the same thing as '-noborder'. '-forceborder' should remove the flags (nand) while '-noborder' should append the borderless flag. This code is an attempt to mitigate the problem. There was not enough bytes to assemble the nand operation for this code path without involving code caves or shifting.
2022-12-06 00:48:11 +01:00
Kawe Mazidjatari
1021a95068 Merge branch 'SignatureMap' into indev 2022-12-04 14:21:14 +01:00
Marvin D
c0c06a14b8 client networkable vars init. 2022-12-03 02:57:11 +01:00
Kawe Mazidjatari
de23c2adf8 Add signature cache map files to all projects 2022-12-02 10:33:20 +01:00
Kawe Mazidjatari
f999372f37 Work in progress signature cache map loading and parsing 2022-12-01 22:47:39 +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
03dc4eada5 Move Miles and Bink hooks/implementations to shared 'codecs' folder 2022-11-27 17:27:35 +01:00
Kawe Mazidjatari
4de66e7866 Add logging hook for Bink Video error output
Hook BinkOpen, and retrieve error message from exported function BinkGetError if BinkOpen failed.
2022-11-27 17:07:03 +01:00
Kawe Mazidjatari
6fbf78a4eb Add logging hook for Miles Sound System debug output
Miles Sound System sets a pointer to a logger function in the exported function "MilesStartup", which can be set by passing a pointer to your logging function in the first parameter. Since this call is inline, we just hook the function that Respawn used for the audio logger instead, which has the actual print within the function stripped.
2022-11-27 15:02:22 +01:00
Kawe Mazidjatari
69cd41881e Move common VPK types to dedicated public header 2022-11-23 12:11:53 +01:00
Kawe Mazidjatari
3c45ea3d2f Compile utlbuffer.cpp with projects 2022-11-23 10:32:23 +01:00