CPhysicsNPCSolver::CheckTouching
0x00794540 · 399 bytes · __thiscall
_ZN17CPhysicsNPCSolver13CheckTouchingEv
Decompiled
undefined (1 param)
/* CPhysicsNPCSolver::CheckTouching() */
undefined4 __thiscall CPhysicsNPCSolver::CheckTouching(CPhysicsNPCSolver *this)
{
CAI_BaseNPC *pCVar1;
int iVar2;
IPhysicsObject *pIVar3;
int iVar4;
char cVar5;
undefined4 uVar6;
IPhysicsFrictionSnapshot *pIVar7;
int iVar8;
uint uVar9;
undefined *puVar10;
uVar9 = *(uint *)(this + 0x448);
uVar6 = 0;
if (((((uVar9 != 0xffffffff) &&
(puVar10 = g_pEntityList + (uVar9 & 0xfff) * 0x10, puVar10 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar10 + 8) == uVar9 >> 0xc)) &&
((pCVar1 = *(CAI_BaseNPC **)(puVar10 + 4), pCVar1 != (CAI_BaseNPC *)0x0 &&
(uVar9 = *(uint *)(this + 0x44c), uVar9 != 0xffffffff)))) &&
((puVar10 = g_pEntityList + (uVar9 & 0xfff) * 0x10, puVar10 != (undefined *)0xfffffffc &&
((*(uint *)(puVar10 + 8) == uVar9 >> 0xc && (iVar2 = *(int *)(puVar10 + 4), iVar2 != 0)))))) {
pIVar3 = *(IPhysicsObject **)(iVar2 + 0x238);
iVar4 = *(int *)(pCVar1 + 0x238);
if ((pIVar3 == (IPhysicsObject *)0x0) || (iVar4 == 0)) {
return 0;
}
pIVar7 = (IPhysicsFrictionSnapshot *)(**(code **)(*(int *)pIVar3 + 0x144))(pIVar3);
while (cVar5 = (**(code **)(*(int *)pIVar7 + 8))(pIVar7), cVar5 != '\0') {
iVar8 = (**(code **)(*(int *)pIVar7 + 0xc))(pIVar7,1);
if (iVar4 == iVar8) {
uVar6 = 1;
cVar5 = IsContactOnNPCHead(this,pIVar7,pIVar3,pCVar1);
if (cVar5 == '\0') goto LAB_00794632;
(**(code **)(*(int *)pIVar7 + 0x2c))(pIVar7);
(**(code **)(*(int *)pIVar7 + 0x30))(pIVar7,1);
(**(code **)(*(int *)pIVar3 + 0x148))(pIVar3,pIVar7);
goto LAB_007946ca;
}
(**(code **)(*(int *)pIVar7 + 0x34))(pIVar7);
}
uVar6 = 0;
LAB_00794632:
(**(code **)(*(int *)pIVar7 + 0x30))(pIVar7,1);
(**(code **)(*(int *)pIVar3 + 0x148))(pIVar3,pIVar7);
uVar9 = (**(code **)(*(int *)pIVar3 + 0x50))(pIVar3);
if (((uVar9 & 0x40) == 0) || (cVar5 = IsIntersecting(this), cVar5 == '\0')) {
return uVar6;
}
LAB_007946ca:
*(undefined4 *)(iVar2 + 0x254) = 0;
BecomePenetrationSolver(this);
}
return uVar6;
}
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.