From f81b01fa70641e9128e08170677a7242fa3cc03f Mon Sep 17 00:00:00 2001 From: Joelrau Date: Sun, 17 Jan 2021 09:50:28 +0200 Subject: [PATCH] Add structures and symbols --- src/client/game/structs.hpp | 19 +++++++++++++------ src/client/game/symbols.hpp | 17 ++++++++++++++--- src/client/std_include.cpp | 9 ++++++++- 3 files changed, 35 insertions(+), 10 deletions(-) diff --git a/src/client/game/structs.hpp b/src/client/game/structs.hpp index e77f879..db2c1cb 100644 --- a/src/client/game/structs.hpp +++ b/src/client/game/structs.hpp @@ -14,10 +14,8 @@ namespace game CODPLAYMODE_NONE = 0x0, CODPLAYMODE_SP = 0x1, CODPLAYMODE_CORE = 0x2, - CODPLAYMODE_SURVIVAL = 0x3, - CODPLAYMODE_ZOMBIES = 0x4, - CODPLAYMODE_GOLIATH = 0x5, - CODPLAYMODE_COUNT = 0x6, + CODPLAYMODE_SURVIVAL = 0x5, + CODPLAYMODE_ZOMBIES = 0x6, }; enum DWOnlineStatus @@ -764,6 +762,12 @@ namespace game CA_ACTIVE = 0xA, }; + enum svscmd_type + { + SV_CMD_CAN_IGNORE = 0x0, + SV_CMD_RELIABLE = 0x1, + }; + enum DBSyncMode { DB_LOAD_ASYNC = 0x0, @@ -900,6 +904,7 @@ namespace game { void* data; Material* material; + Font_s* font; }; enum TestClientType @@ -914,8 +919,10 @@ namespace game { struct gclient_s { - char __pad0[21407]; - int flags; + char __pad0[20708]; + char name[16]; // 20708 + char __pad1[684]; + int flags; // 21408 }; // size = ? struct EntityState diff --git a/src/client/game/symbols.hpp b/src/client/game/symbols.hpp index ef09b1d..3c2fcf3 100644 --- a/src/client/game/symbols.hpp +++ b/src/client/game/symbols.hpp @@ -17,6 +17,7 @@ namespace game WEAK symbol Cmd_AddCommandInternal{ 0x1402EDDB0, 0x1403AF2C0 }; WEAK symbol Cmd_ExecuteSingleCommand{ 0x1402EE350, 0x1403AF900 }; + WEAK symbol Cmd_RemoveCommand{ 0x1402EE910, 0x1403AFEF0 }; WEAK symbol Cmd_TokenizeString{ 0x1402EEA30, 0x1403B0020 }; WEAK symbol Cmd_EndTokenizeString{ 0x1402EE000, 0x1403AF5B0 }; @@ -39,6 +40,7 @@ namespace game WEAK symbol Dvar_FindVar{ 0x140370860, 0x1404BF8B0 }; WEAK symbol Dvar_GetCombinedString{ 0x1402FB590, 0x1403D3290 }; + WEAK symbol Dvar_IsValidName{ 0x140370CB0, 0x1404BFF70 }; WEAK symbol Dvar_Reset{ 0x140372950, 0x1404C1DB0 }; WEAK symbol Dvar_SetCommand{ 0x1403730D0, 0x1404C2520 }; WEAK symbol Dvar_SetString{ 0x140373DE0, 0x1404C3610 }; @@ -72,12 +74,16 @@ namespace game WEAK symbol G_SelectWeapon{ 0x140275380, 0x140340D50 }; WEAK symbol G_TakePlayerWeapon{ 0x1402754E0, 0x1403411D0 }; + WEAK symbol I_CleanStr{ 0x140379010, 0x1404C99A0 }; + WEAK symbol Key_KeynumToString{ 0x14013F380, 0x140207C50 }; WEAK symbol Live_SyncOnlineDataFlags{ 0x1404459A0, 0x140562830 }; WEAK symbol LUI_OpenMenu{ 0, 0x14048E450 }; + WEAK symbol Menu_IsMenuOpenAndVisible{ 0, 0x140488570 }; + WEAK symbol Material_RegisterHandle{ 0x1404919D0, 0x1405AFBE0 }; WEAK symbol NetadrToSockadr{ 0, 0x1404B6F10 }; @@ -120,14 +126,14 @@ namespace game WEAK symbol SV_DirectConnect{ 0, 0x1404397A0 }; WEAK symbol SV_ExecuteClientCommand{ 0, 0x15121D8E6 }; WEAK symbol SV_FastRestart{ 0, 0x1404374E0 }; - WEAK symbol SV_GameSendServerCommand{ 0x1403F3A70, 0x14043E120 }; + WEAK symbol SV_GameSendServerCommand{ 0x1403F3A70, 0x14043E120 }; WEAK symbol SV_GetGuid{ 0, 0x14043E1E0 }; WEAK symbol SV_GetPlayerstateForClientNum{ 0x1403F3AB0, 0x14043E260 }; WEAK symbol SV_KickClientNum{ 0, 0x1404377A0 }; WEAK symbol SV_Loaded{ 0x1403F42C0, 0x14043FA50 }; WEAK symbolSV_MapExists{ 0, 0x140437800 }; - WEAK symbol SV_StartMap{ 0, 0x140438320 }; - WEAK symbol SV_StartMapForParty{ 0, 0x140438490 }; + WEAK symbol SV_StartMap{ 0, 0x140438320 }; + WEAK symbol SV_StartMapForParty{ 0, 0x140438490 }; WEAK symbol Sys_Error{ 0x14038C770, 0x1404D6260 }; WEAK symbol Sys_CreateFile{ 0x14037BCA0, 0x1404CC8A0 }; @@ -136,6 +142,11 @@ namespace game WEAK symbol Sys_SendPacket{ 0x14038E720, 0x1404D8460 }; WEAK symbol Sys_ShowConsole{ 0x14038FA90, 0x1404D98B0 }; + WEAK symbol UI_GetMapDisplayName{ 0, 0x1403B1CD0 }; + WEAK symbol UI_GetGameTypeDisplayName{ 0, 0x1403B1670 }; + WEAK symbol UI_RunMenuScript { 0, 0x140490060 }; + WEAK symbol UI_TextWidth{ 0, 0x140492380 }; + /*************************************************************** * Variables **************************************************************/ diff --git a/src/client/std_include.cpp b/src/client/std_include.cpp index d7fe93e..ec67705 100644 --- a/src/client/std_include.cpp +++ b/src/client/std_include.cpp @@ -2,7 +2,14 @@ #pragma comment(linker, "/base:0x160000000") -extern "C" { +extern "C" +{ + __declspec(dllexport) DWORD NvOptimusEnablement = 1; + __declspec(dllexport) DWORD AmdPowerXpressRequestHighPerformance = 1; +}; + +extern "C" +{ int s_read_arc4random(void*, size_t) { return -1;