CMessageEntity::UpdateOnRemove
0x006f5260 · 271 bytes · __thiscall
_ZN14CMessageEntity14UpdateOnRemoveEv
Decompiled
undefined (1 param)
/* CMessageEntity::UpdateOnRemove() */
void __thiscall CMessageEntity::UpdateOnRemove(CMessageEntity *this)
{
int *piVar1;
uint uVar2;
uint *puVar3;
int iVar4;
undefined *puVar5;
int iVar6;
uint local_20;
CBaseEntity::UpdateOnRemove((CBaseEntity *)this);
local_20 = 0xffffffff;
if (this != (CMessageEntity *)0x0) {
puVar3 = (uint *)(**(code **)(*(int *)this + 0xc))(this);
local_20 = *puVar3;
}
if (0 < DAT_00fe5624) {
piVar1 = (int *)(g_pEntityList + (local_20 & 0xfff) * 0x10 + 4);
iVar4 = 0;
do {
iVar6 = 0;
if (local_20 != 0xffffffff) {
if (piVar1 == (int *)0x0) {
iVar6 = 0;
}
else if (piVar1[1] == local_20 >> 0xc) {
iVar6 = *piVar1;
}
}
uVar2 = *(uint *)(g_MessageEntities + iVar4 * 4);
if (((uVar2 == 0xffffffff) ||
(puVar5 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar5 + 8) != uVar2 >> 0xc)) {
if (iVar6 == 0) goto LAB_006f5340;
}
else if (iVar6 == *(int *)(puVar5 + 4)) {
LAB_006f5340:
CUtlVector<CHandle<CMessageEntity>,CUtlMemory<CHandle<CMessageEntity>,int>>::
ShiftElementsLeft((CUtlVector<CHandle<CMessageEntity>,CUtlMemory<CHandle<CMessageEntity>,int>>
*)&g_MessageEntities,iVar4,1);
DAT_00fe5624 = DAT_00fe5624 + -1;
break;
}
iVar4 = iVar4 + 1;
} while (iVar4 != DAT_00fe5624);
}
CBaseEntity::UpdateOnRemove((CBaseEntity *)this);
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.