Add base detour for G_ClientDoPerFrameNotifies.

This commit is contained in:
JezuzLizard
2023-04-29 18:51:54 -07:00
parent 5d4f84e570
commit 2416967be7
5 changed files with 1805 additions and 1 deletions

View File

@@ -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;