CBaseEntity::PhysicsCheckForEntityUntouch
0x00476040 · 356 bytes · __thiscall
_ZN11CBaseEntity28PhysicsCheckForEntityUntouchEv
Decompiled
undefined (1 param)
/* CBaseEntity::PhysicsCheckForEntityUntouch() */
void __thiscall CBaseEntity::PhysicsCheckForEntityUntouch(CBaseEntity *this)
{
uint uVar1;
undefined1 uVar2;
touchlink_t *ptVar3;
undefined *puVar4;
touchlink_t *ptVar5;
CBaseEntity *this_00;
CBaseEntity *pCVar6;
pCVar6 = (CBaseEntity *)0x1;
this_00 = this;
ptVar3 = (touchlink_t *)GetDataObject(this,1);
uVar2 = g_bCleanupDatObject;
g_bCleanupDatObject = uVar2;
if (ptVar3 != (touchlink_t *)0x0) {
ptVar5 = *(touchlink_t **)(ptVar3 + 8);
g_bCleanupDatObject = 0;
if (ptVar3 != ptVar5) {
do {
while( true ) {
g_pNextLink = *(touchlink_t **)(ptVar5 + 8);
if (*(int *)(ptVar5 + 4) != -1) break;
uVar1 = *(uint *)ptVar5;
pCVar6 = (CBaseEntity *)0x0;
if (((uVar1 != 0xffffffff) &&
(puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc))
&& (*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) {
pCVar6 = *(CBaseEntity **)(puVar4 + 4);
}
this_00 = this;
PhysicsTouch(this,pCVar6);
ptVar5 = g_pNextLink;
if (ptVar3 == g_pNextLink) goto LAB_00476141;
}
if (*(int *)(ptVar5 + 4) != *(int *)(this + 0xa0)) {
uVar1 = *(uint *)ptVar5;
pCVar6 = (CBaseEntity *)0x0;
if (((uVar1 != 0xffffffff) &&
(puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc))
&& (*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) {
pCVar6 = *(CBaseEntity **)(puVar4 + 4);
}
PhysicsNotifyOtherOfUntouch(this,pCVar6);
this_00 = this;
PhysicsRemoveToucher(this,ptVar5);
pCVar6 = (CBaseEntity *)ptVar5;
}
ptVar5 = g_pNextLink;
} while (ptVar3 != g_pNextLink);
LAB_00476141:
g_bCleanupDatObject = uVar2;
if (*(touchlink_t **)(ptVar3 + 8) != ptVar3) goto LAB_00476152;
}
g_bCleanupDatObject = uVar2;
if ((ptVar3 == *(touchlink_t **)(ptVar3 + 0xc)) && (((byte)this[0x3cc] & 2) != 0)) {
DestroyDataObject(this_00,(int)pCVar6);
}
}
LAB_00476152:
g_pNextLink = (touchlink_t *)0x0;
SetCheckUntouch(this,false);
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.