CTempEntTester::Spawn
0x00699520 · 296 bytes · __thiscall
_ZN14CTempEntTester5SpawnEv
Decompiled
undefined (1 param)
/* CTempEntTester::Spawn() */
void __thiscall CTempEntTester::Spawn(CTempEntTester *this)
{
CBaseTempEntity *this_00;
char *pcVar1;
int iVar2;
int in_GS_OFFSET;
CTempEntTester *local_b0;
char local_a0 [128];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
CBaseEntity::AddEffects((CBaseEntity *)this,0x20);
this_00 = (CBaseTempEntity *)CBaseTempEntity::GetList();
*(CBaseTempEntity **)(this + 0x440) = this_00;
if (this_00 != (CBaseTempEntity *)0x0) {
do {
pcVar1 = (char *)CBaseTempEntity::GetName(this_00);
V_strncpy(local_a0,pcVar1,0x80);
pcVar1 = local_a0;
do {
if (*pcVar1 == '\0') break;
iVar2 = tolower((int)*pcVar1);
*pcVar1 = (char)iVar2;
pcVar1 = pcVar1 + 1;
} while (pcVar1 != (char *)0x0);
pcVar1 = strstr(local_a0,(char *)(this + 0x448));
if (pcVar1 != (char *)0x0) {
if (*(int *)(this + 0x440) != 0) {
CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc),(char *)0x0);
goto LAB_0069961e;
}
break;
}
this_00 = (CBaseTempEntity *)CBaseTempEntity::GetNext(*(CBaseTempEntity **)(this + 0x440));
*(CBaseTempEntity **)(this + 0x440) = this_00;
} while (this_00 != (CBaseTempEntity *)0x0);
}
local_b0 = this + 0x448;
DevMsg("Couldn\'t find temp entity \'%s\'\n",local_b0);
UTIL_Remove((CBaseEntity *)this);
LAB_0069961e:
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.