CMessageEntity::Activate
0x006f4df0 · 275 bytes · __thiscall
_ZN14CMessageEntity8ActivateEv
Decompiled
undefined (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CMessageEntity::Activate() */
void __thiscall CMessageEntity::Activate(CMessageEntity *this)
{
undefined4 *puVar1;
int iVar2;
int iVar3;
int iVar4;
undefined4 uVar5;
uVar5 = 0xffffffff;
CBaseEntity::Activate((CBaseEntity *)this);
if (this != (CMessageEntity *)0x0) {
puVar1 = (undefined4 *)(**(code **)(*(int *)this + 0xc))(this);
uVar5 = *puVar1;
}
iVar3 = DAT_00fe5624;
iVar2 = DAT_00fe5624 + 1;
if ((iVar2 <= DAT_00fe561c) || (DAT_00fe5620 < 0)) goto LAB_006f4e2e;
if (DAT_00fe5620 == 0) {
if (DAT_00fe561c == 0) {
if (iVar2 < 9) {
DAT_00fe561c = 8;
goto LAB_006f4e9e;
}
DAT_00fe561c = 8;
}
do {
DAT_00fe561c = DAT_00fe561c * 2;
} while (DAT_00fe561c < iVar2);
}
else {
for (DAT_00fe561c = (DAT_00fe5624 / DAT_00fe5620 + 1) * DAT_00fe5620; DAT_00fe561c < iVar2;
DAT_00fe561c = (DAT_00fe561c + iVar2) / 2) {
}
}
LAB_006f4e9e:
if (g_MessageEntities == (void *)0x0) {
g_MessageEntities = malloc(DAT_00fe561c << 2);
}
else {
g_MessageEntities = realloc(g_MessageEntities,DAT_00fe561c << 2);
iVar2 = DAT_00fe5624 + 1;
}
LAB_006f4e2e:
iVar4 = iVar3 * 4;
iVar3 = (iVar2 - iVar3) + -1;
DAT_00fe5624 = iVar2;
_DAT_00fe5628 = g_MessageEntities;
if (0 < iVar3) {
_V_memmove((void *)((int)g_MessageEntities + iVar4 + 4),(void *)((int)g_MessageEntities + iVar4)
,iVar3 * 4);
}
if ((undefined4 *)(iVar4 + (int)g_MessageEntities) != (undefined4 *)0x0) {
*(undefined4 *)(iVar4 + (int)g_MessageEntities) = uVar5;
}
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.