CSpriteTrail::SpriteTrailCreate
0x004c5860 · 227 bytes · __cdecl
_ZN12CSpriteTrail17SpriteTrailCreateEPKcRK6Vectorb
Decompiled
undefined (3 params)
/* CSpriteTrail::SpriteTrailCreate(char const*, Vector const&, bool) */
CBaseEntity * CSpriteTrail::SpriteTrailCreate(char *param_1,Vector *param_2,bool param_3)
{
int iVar1;
CBaseEntity *this;
iVar1 = CreateEntityByName("env_spritetrail",-1,true);
if (iVar1 != 0) {
this = (CBaseEntity *)__dynamic_cast(iVar1,&CBaseEntity::typeinfo,&typeinfo,0);
if (this != (CBaseEntity *)0x0) goto LAB_004c58b5;
}
this = (CBaseEntity *)0x0;
Warning("classname %s used to create wrong class type\n","env_spritetrail");
LAB_004c58b5:
CSprite::SpriteInit((CSprite *)this,param_1,param_2);
CCollisionProperty::SetSolid((CCollisionProperty *)(this + 0x194),0);
CBaseEntity::SetMoveType(this,8,0);
UTIL_SetSize(this,(Vector *)&vec3_origin,(Vector *)&vec3_origin);
if (param_3) {
CSprite::TurnOn((CSprite *)this);
}
return this;
}
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.