CCollisionEvent::FindOrAddPenetrateEvent
0x0077e070 · 417 bytes · __thiscall
_ZN15CCollisionEvent23FindOrAddPenetrateEventEP11CBaseEntityS1_
Decompiled
undefined (3 params)
/* CCollisionEvent::FindOrAddPenetrateEvent(CBaseEntity*, CBaseEntity*) */
void __thiscall
CCollisionEvent::FindOrAddPenetrateEvent
(CCollisionEvent *this,CBaseEntity *param_1,CBaseEntity *param_2)
{
uint *puVar1;
undefined4 uVar2;
uint uVar3;
int iVar4;
undefined4 *puVar5;
uint *puVar6;
int iVar7;
undefined *puVar8;
CBaseEntity *pCVar9;
undefined4 *puVar10;
iVar4 = *(int *)(this + 300);
iVar7 = iVar4 + -1;
if (-1 < iVar7) {
puVar1 = (uint *)(*(int *)(this + 0x120) + iVar7 * 0x14);
puVar6 = puVar1;
do {
uVar3 = *puVar6;
if (((uVar3 == 0xffffffff) ||
(puVar8 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar8 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar8 + 8) != uVar3 >> 0xc)) {
if (param_1 == (CBaseEntity *)0x0) goto LAB_0077e108;
}
else if (param_1 == *(CBaseEntity **)(puVar8 + 4)) {
LAB_0077e108:
uVar3 = *(uint *)((int)puVar1 +
(int)puVar6 + (iVar4 * -0x14 - *(int *)(this + 0x120)) + 0x18);
pCVar9 = (CBaseEntity *)0x0;
if (((uVar3 != 0xffffffff) &&
(puVar8 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar8 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar8 + 8) == uVar3 >> 0xc)) {
pCVar9 = *(CBaseEntity **)(puVar8 + 4);
}
if (param_2 == pCVar9) goto LAB_0077e142;
}
iVar7 = iVar7 + -1;
puVar6 = puVar6 + -5;
} while (iVar7 != -1);
}
iVar4 = CUtlVector<penetrateevent_t,CUtlMemory<penetrateevent_t,int>>::InsertBefore
((CUtlVector<penetrateevent_t,CUtlMemory<penetrateevent_t,int>> *)(this + 0x120)
,iVar4);
puVar10 = (undefined4 *)(*(int *)(this + 0x120) + iVar4 * 0x14);
if (param_1 == (CBaseEntity *)0x0) {
*puVar10 = 0xffffffff;
}
else {
puVar5 = (undefined4 *)(**(code **)(*(int *)param_1 + 0xc))(param_1);
*puVar10 = *puVar5;
}
if (param_2 == (CBaseEntity *)0x0) {
puVar10[1] = 0xffffffff;
}
else {
puVar5 = (undefined4 *)(**(code **)(*(int *)param_2 + 0xc))(param_2);
puVar10[1] = *puVar5;
}
uVar2 = *(undefined4 *)(gpGlobals + 0xc);
puVar10[4] = 0;
puVar10[2] = uVar2;
UpdateEntityPenetrationFlag(param_1,true);
UpdateEntityPenetrationFlag(param_2,true);
puVar6 = (uint *)(*(int *)(this + 0x120) + iVar4 * 0x14);
LAB_0077e142:
puVar6[3] = *(uint *)(gpGlobals + 0xc);
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.