CBaseEntityList::RemoveEntityAtSlot
0x0044a620 · 227 bytes · __thiscall
_ZN15CBaseEntityList18RemoveEntityAtSlotEi
Decompiled
undefined (2 params)
/* CBaseEntityList::RemoveEntityAtSlot(int) */
void __thiscall CBaseEntityList::RemoveEntityAtSlot(CBaseEntityList *this,int param_1)
{
CEntInfo *pCVar1;
int *piVar2;
CEntInfo *pCVar3;
uint local_20 [4];
piVar2 = *(int **)(this + param_1 * 0x10 + 4);
pCVar1 = (CEntInfo *)(this + param_1 * 0x10 + 4);
if (piVar2 != (int *)0x0) {
local_20[0] = 0xffffffff;
(**(code **)(*piVar2 + 8))(piVar2,local_20);
local_20[0] = *(int *)(this + param_1 * 0x10 + 8) << 0xc | param_1;
(**(code **)(*(int *)this + 4))(this,*(undefined4 *)(this + param_1 * 0x10 + 4),local_20);
*(undefined4 *)(this + param_1 * 0x10 + 4) = 0;
*(uint *)(this + param_1 * 0x10 + 8) = *(int *)(this + param_1 * 0x10 + 8) + 1U & 0x7fff;
pCVar3 = *(CEntInfo **)(this + param_1 * 0x10 + 0xc);
if (pCVar1 != pCVar3) {
if (pCVar3 == (CEntInfo *)0x0) {
*(undefined4 *)(this + 0x10004) = *(undefined4 *)(this + param_1 * 0x10 + 0x10);
}
else {
*(undefined4 *)(pCVar3 + 0xc) = *(undefined4 *)(this + param_1 * 0x10 + 0x10);
}
if (*(int *)(this + param_1 * 0x10 + 0x10) == 0) {
*(undefined4 *)(this + 0x10008) = *(undefined4 *)(this + param_1 * 0x10 + 0xc);
}
else {
*(undefined4 *)(*(int *)(this + param_1 * 0x10 + 0x10) + 8) =
*(undefined4 *)(this + param_1 * 0x10 + 0xc);
}
*(CEntInfo **)(this + param_1 * 0x10 + 0x10) = pCVar1;
*(CEntInfo **)(this + param_1 * 0x10 + 0xc) = pCVar1;
}
if (0x7ff < param_1) {
CEntInfoList::LinkBefore((CEntInfoList *)(this + 0x1000c),(CEntInfo *)0x0,pCVar1);
return;
}
}
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.