CVisibilityMonitor::RemoveEntity
0x006656b0 · 262 bytes · __thiscall
_ZN18CVisibilityMonitor12RemoveEntityEP11CBaseEntity
Decompiled
undefined (2 params)
/* CVisibilityMonitor::RemoveEntity(CBaseEntity*) */
void __thiscall CVisibilityMonitor::RemoveEntity(CVisibilityMonitor *this,CBaseEntity *param_1)
{
uint uVar1;
int iVar2;
undefined4 uVar3;
uint *puVar4;
int iVar5;
undefined1 *puVar6;
undefined *puVar7;
int local_20;
local_20 = *(int *)(this + 0x18);
if (0 < local_20) {
iVar5 = 0;
puVar4 = *(uint **)(this + 0xc);
do {
uVar1 = *puVar4;
if (((uVar1 == 0xffffffff) ||
(puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar7 + 8) != uVar1 >> 0xc)) {
if (param_1 == (CBaseEntity *)0x0) goto LAB_00665730;
}
else if (param_1 == *(CBaseEntity **)(puVar7 + 4)) {
LAB_00665730:
iVar2 = (local_20 - iVar5) + -1;
if (0 < iVar2) {
_V_memmove(puVar4,*(uint **)(this + 0xc) + iVar5 * 5 + 5,iVar2 * 0x14);
local_20 = *(int *)(this + 0x18);
}
*(int *)(this + 0x18) = local_20 + -1;
if (*(int *)(debug_visibility_monitor._28_4_ + 0x30) == 0) {
return;
}
uVar3 = CBaseEntity::GetDebugName(param_1);
puVar6 = &DAT_00d539c2;
if (*(undefined1 **)(param_1 + 0x7c) != (undefined1 *)0x0) {
puVar6 = *(undefined1 **)(param_1 + 0x7c);
}
Msg("VisMon: Removed Entity: %s (%s)\n",puVar6,uVar3);
return;
}
iVar5 = iVar5 + 1;
puVar4 = puVar4 + 5;
} while (iVar5 != local_20);
}
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.