CBaseEntity::PhysicsRemoveTouchedList
0x004759c0 · 616 bytes · __cdecl
_ZN11CBaseEntity24PhysicsRemoveTouchedListEPS_
Decompiled
undefined (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CBaseEntity::PhysicsRemoveTouchedList(CBaseEntity*) */
void CBaseEntity::PhysicsRemoveTouchedList(CBaseEntity *param_1)
{
uint uVar1;
uint *puVar2;
undefined1 uVar3;
int iVar4;
undefined4 uVar5;
uint *puVar6;
undefined4 uVar7;
undefined4 uVar8;
CBaseEntity *pCVar9;
undefined *puVar10;
int iVar11;
int iVar12;
undefined1 *this;
uint *puVar13;
uint *puVar14;
CBaseEntity *local_24;
int local_20;
puVar13 = (uint *)0x1;
this = param_1;
puVar6 = (uint *)GetDataObject(param_1,1);
uVar3 = g_bCleanupDatObject;
g_bCleanupDatObject = uVar3;
if (puVar6 != (uint *)0x0) {
g_bCleanupDatObject = 0;
puVar2 = (uint *)puVar6[2];
while ((puVar14 = puVar2, puVar6 != puVar14 && (puVar14 != (uint *)0x0))) {
uVar1 = *puVar14;
pCVar9 = (CBaseEntity *)0x0;
puVar2 = (uint *)puVar14[2];
if ((uVar1 != 0xffffffff) &&
((puVar10 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar10 != (undefined *)0xfffffffc &&
(*(uint *)(puVar10 + 8) == uVar1 >> 0xc)))) {
pCVar9 = *(CBaseEntity **)(puVar10 + 4);
}
PhysicsNotifyOtherOfUntouch(param_1,pCVar9);
uVar5 = g_EdictTouchLinks._20_4_;
iVar4 = linksallocated;
if (*(int *)(debug_touchlinks._28_4_ + 0x30) != 0) {
uVar1 = *puVar14;
if (((uVar1 == 0xffffffff) ||
(puVar10 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc))
|| (*(uint *)(puVar10 + 8) != uVar1 >> 0xc)) {
iVar12 = _DAT_00000030;
if (_DAT_00000030 != 0) goto LAB_00475a8a;
LAB_00475c28:
local_20 = 0;
iVar11 = *(int *)(param_1 + 0x30);
if (iVar11 == 0) goto LAB_00475c40;
LAB_00475aa8:
iVar12 = iVar11 - *(int *)(gpGlobals + 0x58) >> 4;
}
else {
iVar12 = *(int *)(*(int *)(puVar10 + 4) + 0x30);
if (iVar12 == 0) goto LAB_00475c28;
LAB_00475a8a:
iVar11 = *(int *)(param_1 + 0x30);
local_20 = iVar12 - *(int *)(gpGlobals + 0x58) >> 4;
if (iVar11 != 0) goto LAB_00475aa8;
LAB_00475c40:
iVar12 = 0;
}
local_24 = (CBaseEntity *)0x0;
if (((uVar1 != 0xffffffff) &&
(puVar10 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar10 != (undefined *)0xfffffffc))
&& (*(uint *)(puVar10 + 8) == uVar1 >> 0xc)) {
local_24 = *(CBaseEntity **)(puVar10 + 4);
}
uVar7 = GetDebugName(local_24);
uVar8 = GetDebugName(param_1);
Msg("remove 0x%x: %s-%s (%d-%d) [%d in play, %d max]\n",puVar14,uVar8,uVar7,iVar12,local_20,
iVar4,uVar5);
}
if (puVar14 == g_pNextLink) {
g_pNextLink = (uint *)puVar14[2];
}
linksallocated = linksallocated + -1;
puVar14[2] = 0;
puVar14[3] = 0;
this = g_EdictTouchLinks;
CUtlMemoryPool::Free((CUtlMemoryPool *)g_EdictTouchLinks,puVar14);
puVar13 = puVar14;
}
g_bCleanupDatObject = uVar3;
if (((byte)param_1[0x3cc] & 2) != 0) {
DestroyDataObject((CBaseEntity *)this,(int)puVar13);
}
}
*(undefined4 *)(param_1 + 0xa0) = 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.