L L4D2node

_CreateEntity<CGib>

0x0066cd20 · 100 bytes · __cdecl

_Z13_CreateEntityI4CGibEPT_S2_PKc.isra.35.constprop.96

Decompiled

CGib * (2 params)

/* CGib* _CreateEntity<CGib>(CGib*, char const*) [clone .isra.35] [clone .constprop.96] */

CGib * _CreateEntity<CGib>(CGib *param_1,char *param_2)

{
  int iVar1;
  CGib *pCVar2;
  
  iVar1 = CreateEntityByName("gib",-1,true);
  if (iVar1 != 0) {
    pCVar2 = (CGib *)__dynamic_cast(iVar1,&CBaseEntity::typeinfo,&CGib::typeinfo,0);
    if (pCVar2 != (CGib *)0x0) {
      return pCVar2;
    }
  }
  Warning("classname %s used to create wrong class type\n","gib");
  return (CGib *)0x0;
}

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)