From 57248cc8f89653f19af6ecee75c07b74803c6542 Mon Sep 17 00:00:00 2001 From: ineed bots Date: Sat, 29 Apr 2023 14:12:49 -0600 Subject: [PATCH] purposed cleanup --- src/component/test.cpp | 3 ++- src/game/game.hpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/component/test.cpp b/src/component/test.cpp index 9d4cafd..1b782c1 100644 --- a/src/component/test.cpp +++ b/src/component/test.cpp @@ -173,7 +173,8 @@ namespace test //utils::hook::jump(0x4D3296, our_funny_hook); // test usercall detour! - scr_getentityid_hook.create(0x692520, scr_getentityid_stub); + scr_getentityid_hook.create(game::Scr_GetEntityId(), scr_getentityid_stub); + // scr_getentityid_hook.create(game::SL_GetStringOfSize.get(), sl_getstringofsize_stub); } private: diff --git a/src/game/game.hpp b/src/game/game.hpp index 321a6a0..696e4d9 100644 --- a/src/game/game.hpp +++ b/src/game/game.hpp @@ -51,7 +51,8 @@ namespace game void Scr_AddUndefined(game::scriptInstance_t inst); gentity_s* Scr_GetEntity(unsigned int arg_index); void Scr_AddEntity(game::scriptInstance_t inst, gentity_s* ent); - unsigned int Scr_GetEntityId(scriptInstance_t inst, unsigned int entnum, classNum_e classnum, unsigned int clientnum, void* call_addr = CALL_ADDR(0x0, 0x692520)); + __inline void* Scr_GetEntityId() { return CALL_ADDR(0x0, 0x692520); } + unsigned int Scr_GetEntityId(scriptInstance_t inst, unsigned int entnum, classNum_e classnum, unsigned int clientnum, void* call_addr = Scr_GetEntityId()); void Scr_AddEntityNum(scriptInstance_t inst, unsigned int entid); pathnode_t* Scr_GetPathnode(scriptInstance_t inst); void Scr_AddPathnode(scriptInstance_t inst, pathnode_t* node);