CNotifyList::AddEntity
0x0067b490 · 245 bytes · __thiscall
_ZN11CNotifyList9AddEntityEP11CBaseEntityS1_
Decompiled
undefined (3 params)
/* CNotifyList::AddEntity(CBaseEntity*, CBaseEntity*) */
void __thiscall CNotifyList::AddEntity(CNotifyList *this,CBaseEntity *param_1,CBaseEntity *param_2)
{
int iVar1;
int iVar2;
void *pvVar3;
int iVar4;
int iVar5;
*(uint *)(param_2 + 0x14c) = *(uint *)(param_2 + 0x14c) | 0x40;
iVar1 = *(int *)(this + 0x14);
iVar5 = *(int *)(this + 0xc);
iVar4 = iVar1 + 1;
if (iVar5 < iVar4) {
iVar2 = *(int *)(this + 0x10);
if (-1 < iVar2) {
if (iVar2 == 0) {
if (iVar5 == 0) {
if (iVar4 < 5) {
iVar2 = 4;
goto LAB_0067b52f;
}
iVar5 = 4;
}
do {
iVar2 = iVar5 * 2;
if (iVar4 <= iVar2) break;
iVar2 = iVar5 * 4;
iVar5 = iVar2;
} while (iVar2 < iVar4);
}
else {
for (iVar2 = (iVar1 / iVar2 + 1) * iVar2; iVar2 < iVar4; iVar2 = (iVar2 + iVar4) / 2) {
}
}
LAB_0067b52f:
*(int *)(this + 0xc) = iVar2;
if (*(void **)(this + 8) == (void *)0x0) {
pvVar3 = malloc(iVar2 << 3);
*(void **)(this + 8) = pvVar3;
}
else {
pvVar3 = realloc(*(void **)(this + 8),iVar2 << 3);
*(void **)(this + 8) = pvVar3;
iVar4 = *(int *)(this + 0x14) + 1;
}
goto LAB_0067b4b6;
}
}
pvVar3 = *(void **)(this + 8);
LAB_0067b4b6:
*(int *)(this + 0x14) = iVar4;
iVar5 = iVar1 * 8;
iVar4 = (iVar4 - iVar1) + -1;
*(void **)(this + 0x18) = pvVar3;
if (0 < iVar4) {
_V_memmove((void *)((int)pvVar3 + iVar5 + 8),(void *)((int)pvVar3 + iVar5),iVar4 * 8);
pvVar3 = *(void **)(this + 8);
}
*(undefined4 *)((int)pvVar3 + iVar5) = param_1;
((undefined4 *)((int)pvVar3 + iVar5))[1] = param_2;
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.