CGlobalEntityList::AddToDeleteList
0x0067ba80 · 272 bytes · __thiscall
_ZN17CGlobalEntityList15AddToDeleteListEP18IServerNetworkable
Decompiled
undefined (2 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CGlobalEntityList::AddToDeleteList(IServerNetworkable*) */
void __thiscall
CGlobalEntityList::AddToDeleteList(CGlobalEntityList *this,IServerNetworkable *param_1)
{
int *piVar1;
int iVar2;
int iVar3;
int iVar4;
if (param_1 == (IServerNetworkable *)0x0) {
return;
}
piVar1 = (int *)(*(code *)**(undefined4 **)param_1)(param_1);
piVar1 = (int *)(**(code **)(*piVar1 + 0xc))(piVar1);
iVar3 = DAT_00fdb2e8;
if (*piVar1 == -1) {
return;
}
iVar2 = DAT_00fdb2e8 + 1;
if ((iVar2 <= _DAT_00fdb2e0) || (DAT_00fdb2e4 < 0)) goto LAB_0067babb;
if (DAT_00fdb2e4 == 0) {
if (_DAT_00fdb2e0 == 0) {
if (iVar2 < 9) {
_DAT_00fdb2e0 = 8;
goto LAB_0067bb2f;
}
_DAT_00fdb2e0 = 8;
}
do {
_DAT_00fdb2e0 = _DAT_00fdb2e0 * 2;
} while (_DAT_00fdb2e0 < iVar2);
}
else {
for (_DAT_00fdb2e0 = (DAT_00fdb2e8 / DAT_00fdb2e4 + 1) * DAT_00fdb2e4; _DAT_00fdb2e0 < iVar2;
_DAT_00fdb2e0 = (_DAT_00fdb2e0 + iVar2) / 2) {
}
}
LAB_0067bb2f:
if (g_DeleteList == (void *)0x0) {
g_DeleteList = malloc(_DAT_00fdb2e0 << 2);
}
else {
g_DeleteList = realloc(g_DeleteList,_DAT_00fdb2e0 << 2);
iVar2 = DAT_00fdb2e8 + 1;
}
LAB_0067babb:
iVar4 = iVar3 * 4;
iVar3 = (iVar2 - iVar3) + -1;
DAT_00fdb2e8 = iVar2;
_DAT_00fdb2ec = g_DeleteList;
if (0 < iVar3) {
_V_memmove((void *)((int)g_DeleteList + iVar4 + 4),(void *)((int)g_DeleteList + iVar4),iVar3 * 4
);
}
if ((undefined4 *)(iVar4 + (int)g_DeleteList) != (undefined4 *)0x0) {
*(undefined4 *)(iVar4 + (int)g_DeleteList) = param_1;
}
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.