CTerrorGameRules::CleanUpMap()::CTerrorMapEntityFilter::CreateNextEntity
0x00503d80 · 138 bytes · __thiscall
_ZZN16CTerrorGameRules10CleanUpMapEvEN22CTerrorMapEntityFilter16CreateNextEntityEPKc
Decompiled
undefined (2 params)
/* CreateNextEntity(char const*) */
undefined4 __thiscall
CTerrorGameRules::CleanUpMap()::CTerrorMapEntityFilter::CreateNextEntity
(CTerrorMapEntityFilter *this,char *param_1)
{
uint *puVar1;
uint uVar2;
undefined4 uVar3;
if (*(uint *)(this + 4) == 0xffff) {
return 0;
}
puVar1 = (uint *)(g_MapEntityRefs + (*(uint *)(this + 4) & 0xffff) * 0xc);
*(uint *)(this + 4) = (uint)*(ushort *)((int)puVar1 + 10);
uVar2 = *puVar1;
if ((uVar2 != 0xffffffff) &&
(((0x7ff < uVar2 || (*(int *)(gpGlobals + 0x58) == 0)) ||
((*(byte *)(*(int *)(gpGlobals + 0x58) + uVar2 * 0x10) & 2) != 0)))) {
uVar3 = CreateEntityByName(param_1,uVar2,true);
return uVar3;
}
uVar3 = CreateEntityByName(param_1,-1,true);
return uVar3;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.