mirror of
https://github.com/JezuzLizard/T4SP-Server-Plugin.git
synced 2025-07-04 18:21:50 +00:00
Add base detour for G_ClientDoPerFrameNotifies.
This commit is contained in:
@ -32,6 +32,15 @@ namespace game
|
||||
{ "dead", TEAM_DEAD }
|
||||
};
|
||||
|
||||
void G_ClientDoPerFrameNotifies(gentity_s* ent, void* call_addr)
|
||||
{
|
||||
__asm
|
||||
{
|
||||
mov edi, ent;
|
||||
call call_addr;
|
||||
}
|
||||
}
|
||||
|
||||
void Scr_PrintPrevCodePos(const char* codepos, int scriptInstance, con_channel_e channel, int index)
|
||||
{
|
||||
static const auto call_addr = SELECT(0x0, 0x68B340);
|
||||
@ -437,6 +446,20 @@ namespace game
|
||||
return answer;
|
||||
}
|
||||
|
||||
void Scr_NotifyNum(scriptInstance_t inst, int entNum, int entClass, unsigned int notifStr, int numParams, void* call_addr)
|
||||
{
|
||||
__asm
|
||||
{
|
||||
push numParams;
|
||||
push notifStr;
|
||||
push entClass;
|
||||
push entNum;
|
||||
mov eax, inst;
|
||||
call call_addr;
|
||||
add esp, 0x10;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int Scr_GetNumParam(scriptInstance_t inst)
|
||||
{
|
||||
return gScrVmPub[inst].outparamcount;
|
||||
|
@ -24,6 +24,9 @@ namespace game
|
||||
|
||||
extern std::map<std::string, team_t> team_map;
|
||||
|
||||
__inline void* G_ClientDoPerFrameNotifies() { return CALL_ADDR(0x0, 0x503540); }
|
||||
void G_ClientDoPerFrameNotifies(gentity_s* ent, void* call_addr = G_ClientDoPerFrameNotifies());
|
||||
|
||||
void Scr_PrintPrevCodePos(const char* codepos, int scriptInstance, con_channel_e channel, int index);
|
||||
void RemoveRefToObject(scriptInstance_t inst, unsigned int id);
|
||||
int Scr_LoadScript(const char* file, scriptInstance_t inst);
|
||||
@ -62,6 +65,9 @@ namespace game
|
||||
void Scr_AddArrayStringIndexed(scriptInstance_t inst, unsigned short id);
|
||||
unsigned short Scr_ExecThread(scriptInstance_t inst, int handle, int paramCount);
|
||||
unsigned short Scr_ExecEntThread(scriptInstance_t inst, int entNum, int handle, int numParams, int entClass);
|
||||
__inline void* Scr_NotifyNum() { return CALL_ADDR(0x0, 0x698CC0); }
|
||||
void Scr_NotifyNum(scriptInstance_t inst, int entNum, int entClass, unsigned int notifStr, int numParams, void* call_addr = Scr_NotifyNum());
|
||||
|
||||
unsigned int Scr_GetNumParam(scriptInstance_t inst);
|
||||
VariableType Scr_GetType(scriptInstance_t inst, unsigned int index);
|
||||
void Scr_Error(const char* err, scriptInstance_t inst, bool is_terminal);
|
||||
|
1682
src/game/structs.hpp
1682
src/game/structs.hpp
File diff suppressed because it is too large
Load Diff
@ -32,6 +32,8 @@ namespace game
|
||||
WEAK symbol<function_stack_t> function_stack{ 0x0, 0x3BDDDD0 };
|
||||
WEAK symbol<scr_const_t> scr_const{0x0, 0x1F33B90};
|
||||
|
||||
WEAK symbol<WeaponDef*> BG_WeaponNames{ 0x0, 0x8F6770 };
|
||||
|
||||
// Dvars
|
||||
|
||||
WEAK symbol<dvar_s*> com_developer{ 0x0, 0x1F55288 };
|
||||
|
Reference in New Issue
Block a user