1903 Commits

Author SHA1 Message Date
Kawe Mazidjatari
1544442cc4 Add CClient::SetSignonState to SDK
Backwards compatible up to S0.
2023-01-20 16:01:39 +01:00
Kawe Mazidjatari
9e490c16cc Rename unknown field in CClientState
Field 'field_AC' is 'm_nInSequenceNr'.
2023-01-20 16:01:00 +01:00
Kawe Mazidjatari
a69c287e17 Align IClientMessageHandler vftable
Ported from S7 to S3.
2023-01-20 16:00:12 +01:00
Kawe Mazidjatari
9720d8b0f1 Fix 'g_pGlobals' and 'UTIL_PlayerByIndex()'
'UTIL_PlayerByIndex' now returns the player from the edict array properly, 'g_pGlobals' had to be dereferenced twice.
2023-01-20 14:07:25 +01:00
Kawe Mazidjatari
05d2c5e3ea Add g_pEntityList to SDK 2023-01-20 02:12:14 +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
Kawe Mazidjatari
e9f907638f Improve plugin debugging code
Log using sdk loggers, warn if it failed to load.
2023-01-20 00:42:13 +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
e7522ce0d6 Fix compile error
IMoveHelper compile error in player.h.
2023-01-19 21:51:43 +01:00
Kawe Mazidjatari
934d18809a Finish 'CPlayer::RunNullCommand' 2023-01-19 21:45:15 +01:00
Kawe Mazidjatari
aec30a8047 Slight fix for CGlobalVarsBase
Fixed offsets for 'm_fCurTime' and 'm_fFrameTime'.
2023-01-19 21:44:42 +01:00
Kawe Mazidjatari
1853f3d643 CPlayer: Finish user command executor
Command executor finished. Also improved the structure slightly to use CUserCmd instead of padded characters for 'm_LastCmd'.
2023-01-19 20:48:41 +01:00
Kawe Mazidjatari
119bd9ae61 CUserCmd improvements
* Adjust structure size to that of the implementation in the S3 executable.
* Added copy method (copies a source usercmd into current).
2023-01-19 20:45:59 +01:00
Kawe Mazidjatari
9231861f87 Light cleanup in movehelper_server.h 2023-01-19 19:39:36 +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
7279039226 Delete empty files 2023-01-19 18:57:28 +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
b2ffab07c3 Fix mistake
Should be 'm_lastUCmdSimulationRemainderTime' instead of 'm_totalExtraClientCmdTimeAttempted'.
2023-01-19 15:29:53 +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
d4b576bd49 Light structures cleanup 2023-01-19 15:06:08 +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
Kawe Mazidjatari
b21fa6b665 Fix CBaseAnimating and CPlayer structure alignment
This change creates correct assembly output.
2023-01-19 02:02:42 +01:00
Kawe Mazidjatari
c0d9d4462b Improve CAnimationLayer
Field 'm_animationLayerOwner' is CBaseEntity*.
2023-01-19 01:59:11 +01:00
Amos
b63765e1dc Finished CPlayer inheritance 2023-01-18 12:39:18 +01:00
Kawe Mazidjatari
75406ab7bc Fix linker error for client DLL
Unresolved external symbol for g_pEngineServer VFTable.
2023-01-18 01:40:24 +01:00
Kawe Mazidjatari
d5ef71200f Update sig cache minor version
Invalidate old databases and rebuild as signature for 'gpGlobals' has changed.
2023-01-18 01:35:27 +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
94bf515ba7 Add gpGlobals to SDK 2023-01-17 11:21:10 +01:00
Kawe Mazidjatari
b477bbbeaa Use correct type size for 'VPANEL'
Thanks p0358
2023-01-17 00:53:19 +01:00
Kawe Mazidjatari
85aa262360 Merge branch 'CreateFakeClient' into indev 2023-01-17 00:42:51 +01:00
Kawe Mazidjatari
98331796b2 Fix bug in LZHAM debug log formatting
Should be '%llu' or '%zu' for size types.
2023-01-17 00:42:38 +01:00
Kawe Mazidjatari
27cc07b547 Remove unused patterns
No longer used.
2023-01-17 00:32:08 +01:00
Kawe Mazidjatari
78960f6bbd Finish initial implementation of basic bots 2023-01-17 00:08:15 +01:00
Kawe Mazidjatari
909a3d7876 Initialize pointer to CVEngineServer VFTable 2023-01-17 00:07:53 +01:00
Kawe Mazidjatari
76e7111101 Fixed interface method name
Thanks rexx!
2023-01-16 23:14:10 +01:00
Kawe Mazidjatari
1d960c50dd Partially reversed IVEngineServer interface class
Partially reversed. Aligns with S0 to S3.
2023-01-16 23:05:36 +01:00
Kawe Mazidjatari
202e4525a1 Fix linker error
Unresolved external symbols due to declaration without definitions for server game interface globals.
2023-01-16 21:16:34 +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
96fb0519d9 Update launcher help text 2023-01-16 17:59:49 +01:00
Amos
11648d4932 Additional bot stuff 2023-01-16 16:54:01 +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
Amos
39920283c0 Fix arithmetic register formatting for high number
High values would cause the formatting to be decimal while it should be hexadecimal if the value equals or exceeds one million.
2023-01-16 15:28:39 +01:00
Kawe Mazidjatari
ca3e5ac9d1 ImGuiConfig: fix incorrect allocation size causing OOB memory write
Fix was found after the issue in the previous commit was found.
2023-01-15 18:12:39 +01:00
rexx
9d2ffa6e26
bansystem: fix incorrect allocation size causing OOB memory write 2023-01-14 15:35:46 +00:00
Kawe Mazidjatari
d8dd9aba93 Fix CCrashHandler method name
Renamed from APU to ALU (typo).
2023-01-04 14:55:58 +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
1abc14b828 Improve string pooling
Changed some string concats back to the old approach as this will pool strings a lot better, especially common strings such as "%s - %s". Also removed from a few other (not all) functions to maintain consistency with logs emitted from the game itself.
2022-12-28 22:00:06 +01:00