CBaseTrigger::EndTouch
0x00b1f840 · 354 bytes · __thiscall
_ZN12CBaseTrigger8EndTouchEP11CBaseEntity
Decompiled
undefined (2 params)
/* CBaseTrigger::EndTouch(CBaseEntity*) */
void __thiscall CBaseTrigger::EndTouch(CBaseTrigger *this,CBaseEntity *param_1)
{
CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>> *this_00;
uint uVar1;
bool bVar2;
char cVar3;
undefined4 *puVar4;
int iVar5;
undefined *puVar6;
int iVar7;
int iVar8;
undefined4 local_20 [4];
cVar3 = IsTouching(this,param_1);
if (cVar3 == '\0') {
return;
}
local_20[0] = 0xffffffff;
if (param_1 != (CBaseEntity *)0x0) {
puVar4 = (undefined4 *)(**(code **)(*(int *)param_1 + 0xc))(param_1);
local_20[0] = *puVar4;
}
this_00 = (CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>> *)(this + 0x554);
iVar5 = CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>>::Find
(this_00,(CHandle *)local_20);
if (iVar5 != -1) {
CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>>::ShiftElementsLeft
(this_00,iVar5,1);
*(int *)(this + 0x560) = *(int *)(this + 0x560) + -1;
}
COutputEvent::FireOutput((COutputEvent *)(this + 0x4f4),param_1,(CBaseEntity *)this,0.0);
bVar2 = false;
iVar5 = *(int *)(this + 0x560) + -1;
iVar8 = iVar5 * 4;
if (-1 < iVar5) {
do {
while ((((uVar1 = *(uint *)(*(int *)(this + 0x554) + iVar8), uVar1 == 0xffffffff ||
(puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc))
|| (*(uint *)(puVar6 + 8) != uVar1 >> 0xc)) || (*(int *)(puVar6 + 4) == 0))) {
iVar7 = iVar5 + -1;
iVar8 = iVar8 + -4;
CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>>::ShiftElementsLeft
(this_00,iVar5,1);
*(int *)(this + 0x560) = *(int *)(this + 0x560) + -1;
iVar5 = iVar7;
if (iVar7 == -1) goto LAB_00b1f96f;
}
iVar5 = iVar5 + -1;
iVar8 = iVar8 + -4;
bVar2 = true;
} while (iVar5 != -1);
LAB_00b1f96f:
if (bVar2) {
return;
}
}
COutputEvent::FireOutput((COutputEvent *)(this + 0x50c),param_1,(CBaseEntity *)this,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.