L L4D2node

CSprite::SpriteCreate

0x004c39c0 · 227 bytes · __cdecl

_ZN7CSprite12SpriteCreateEPKcRK6Vectorb

Decompiled

undefined (3 params)

/* CSprite::SpriteCreate(char const*, Vector const&, bool) */

CBaseEntity * CSprite::SpriteCreate(char *param_1,Vector *param_2,bool param_3)

{
  int iVar1;
  CBaseEntity *this;
  
  iVar1 = CreateEntityByName("env_sprite",-1,true);
  if (iVar1 != 0) {
    this = (CBaseEntity *)__dynamic_cast(iVar1,&CBaseEntity::typeinfo,&typeinfo,0);
    if (this != (CBaseEntity *)0x0) goto LAB_004c3a15;
  }
  this = (CBaseEntity *)0x0;
  Warning("classname %s used to create wrong class type\n","env_sprite");
LAB_004c3a15:
  SpriteInit((CSprite *)this,param_1,param_2);
  CCollisionProperty::SetSolid((CCollisionProperty *)(this + 0x194),0);
  UTIL_SetSize(this,(Vector *)&vec3_origin,(Vector *)&vec3_origin);
  CBaseEntity::SetMoveType(this,0,0);
  if (param_3) {
    TurnOn((CSprite *)this);
  }
  return this;
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)