CPhysicsHook::FrameUpdatePostEntityThink
0x0077c340 · 521 bytes · __thiscall
_ZN12CPhysicsHook26FrameUpdatePostEntityThinkEv
Decompiled
undefined (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CPhysicsHook::FrameUpdatePostEntityThink() */
void __thiscall CPhysicsHook::FrameUpdatePostEntityThink(CPhysicsHook *this)
{
uint *puVar1;
int iVar2;
undefined4 uVar3;
undefined4 uVar4;
char cVar5;
int iVar6;
int *piVar7;
int *in_stack_ffffff94;
undefined4 local_24;
undefined4 local_20;
local_24 = 0;
local_20 = 0;
if (_towlower == (int *)0x0) {
piVar7 = (int *)0x0;
}
else {
in_stack_ffffff94 = _towlower;
(*(code *)_towlower[0x14])
(_towlower,&local_24,0,0,0,0,"/data/src/game/server/physics.cpp",0x1a2,
&FrameUpdatePostEntityThink()::tm_fmt,"(%s)%s","Physics",
"CPhysicsHook::FrameUpdatePostEntityThink");
piVar7 = _towlower;
}
uVar4 = local_20;
uVar3 = local_24;
iVar2 = _DAT_0105db00;
/* try { // try from 0077c4c8 to 0077c529 has its CatchHandler @ 0077c5ee */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar6 = ThreadGetCurrentId(), iVar2 == iVar6)) {
if ((char *)*_DAT_0105d15c != "CPhysicsHook::FrameUpdatePostEntityThink") {
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcb09ac,(char *)0x0,0xd48ff9);
}
puVar1 = (uint *)(_DAT_0105d1e8 + 4 + _DAT_0105d15c[0x1c] * 8);
*puVar1 = *puVar1 | 4;
in_stack_ffffff94 = _DAT_0105d15c;
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
/* try { // try from 0077c404 to 0077c42e has its CatchHandler @ 0077c55b */
cVar5 = CBaseEntity::IsSimulatingOnAlternateTicks();
if (cVar5 != '\0') {
this[0x59] = (CPhysicsHook)0x0;
PhysFrame((float)in_stack_ffffff94);
}
this[0x59] = (CPhysicsHook)0x1;
PhysFrame((float)in_stack_ffffff94);
iVar2 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(), iVar2 == iVar6)) {
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
if (piVar7 != (int *)0x0) {
(*(code *)piVar7[0x15])(piVar7,uVar3,uVar4,0,0,0);
}
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.