CEntityFactory<CHandleTest>::Create
0x0057ac80 · 148 bytes · __thiscall
_ZN14CEntityFactoryI11CHandleTestE6CreateEPKc
Decompiled
undefined (2 params)
/* CEntityFactory<CHandleTest>::Create(char const*) */
CBaseEntity * __thiscall
CEntityFactory<CHandleTest>::Create(CEntityFactory<CHandleTest> *this,char *param_1)
{
CBaseEdict *this_00;
CBaseEntity *this_01;
undefined **ppuVar1;
int iVar2;
uint in_stack_ffffffe8;
this_01 = CBaseEntity::operator_new((CBaseEntity *)0x448,in_stack_ffffffe8);
/* try { // try from 0057aca1 to 0057aca5 has its CatchHandler @ 0057ad37 */
CBaseEntity::CBaseEntity(this_01,false);
*(undefined ***)this_01 = &PTR__CHandleTest_00c539a8;
ppuVar1 = &PTR__CHandleTest_00c539a8;
*(undefined4 *)(this_01 + 0x440) = 0xffffffff;
if (this_01[0x444] != (CBaseEntity)0x0) {
if (this_01[0x6c] == (CBaseEntity)0x0) {
this_00 = *(CBaseEdict **)(this_01 + 0x30);
if (this_00 != (CBaseEdict *)0x0) {
*(uint *)this_00 = *(uint *)this_00 | 0x101;
/* try { // try from 0057acf6 to 0057acfa has its CatchHandler @ 0057ad1d */
iVar2 = CBaseEdict::GetChangeAccessor(this_00);
*(undefined2 *)(iVar2 + 2) = 0;
ppuVar1 = *(undefined ***)this_01;
}
this_01[0x444] = (CBaseEntity)0x0;
}
else {
this_01[0x70] = (CBaseEntity)((byte)this_01[0x70] | 1);
this_01[0x444] = (CBaseEntity)0x0;
}
}
(*(code *)ppuVar1[0x1e])(this_01,param_1);
return this_01 + 0x24;
}
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.