CGlobalEntityList::AddPostClientMessageEntity
0x0067be60 · 268 bytes · __thiscall
_ZN17CGlobalEntityList26AddPostClientMessageEntityEP11CBaseEntity
Decompiled
undefined (2 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CGlobalEntityList::AddPostClientMessageEntity(CBaseEntity*) */
void __thiscall
CGlobalEntityList::AddPostClientMessageEntity(CGlobalEntityList *this,CBaseEntity *param_1)
{
undefined4 uVar1;
undefined4 *puVar2;
int iVar3;
int iVar4;
int iVar5;
puVar2 = (undefined4 *)(**(code **)(*(int *)param_1 + 0xc))(param_1);
iVar5 = DAT_00fdb2bc;
uVar1 = *puVar2;
iVar4 = DAT_00fdb2bc + 1;
if ((iVar4 <= _DAT_00fdb2b4) || (DAT_00fdb2b8 < 0)) goto LAB_0067be93;
if (DAT_00fdb2b8 == 0) {
iVar3 = _DAT_00fdb2b4;
if (_DAT_00fdb2b4 == 0) {
if (iVar4 < 0x11) {
_DAT_00fdb2b4 = 0x10;
goto LAB_0067bf0f;
}
iVar3 = 0x10;
}
do {
_DAT_00fdb2b4 = iVar3 * 2;
if (iVar4 <= _DAT_00fdb2b4) break;
_DAT_00fdb2b4 = iVar3 * 4;
iVar3 = _DAT_00fdb2b4;
} while (_DAT_00fdb2b4 < iVar4);
}
else {
for (_DAT_00fdb2b4 = (DAT_00fdb2bc / DAT_00fdb2b8 + 1) * DAT_00fdb2b8; _DAT_00fdb2b4 < iVar4;
_DAT_00fdb2b4 = (_DAT_00fdb2b4 + iVar4) / 2) {
}
}
LAB_0067bf0f:
if (g_PostClientManager == (void *)0x0) {
g_PostClientManager = malloc(_DAT_00fdb2b4 * 2);
}
else {
g_PostClientManager = realloc(g_PostClientManager,_DAT_00fdb2b4 * 2);
iVar4 = DAT_00fdb2bc + 1;
}
LAB_0067be93:
iVar3 = iVar5 * 2;
iVar5 = (iVar4 - iVar5) + -1;
DAT_00fdb2bc = iVar4;
_DAT_00fdb2c0 = g_PostClientManager;
if (0 < iVar5) {
_V_memmove((void *)((int)g_PostClientManager + iVar3 + 2),
(void *)((int)g_PostClientManager + iVar3),iVar5 * 2);
}
if ((ushort *)(iVar3 + (int)g_PostClientManager) != (ushort *)0x0) {
*(ushort *)(iVar3 + (int)g_PostClientManager) = (ushort)uVar1 & 0xfff;
}
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.