L L4D2node

CPointScriptTemplate::AddTemplate

0x007e0220 · 85 bytes · __thiscall

_ZN20CPointScriptTemplate11AddTemplateEPKcP9HSCRIPT__

Decompiled

undefined (3 params)

/* CPointScriptTemplate::AddTemplate(char const*, HSCRIPT__*) */

void __thiscall
CPointScriptTemplate::AddTemplate(CPointScriptTemplate *this,char *param_1,HSCRIPT__ *param_2)

{
  char *local_14;
  undefined4 local_10;
  
  local_14 = (char *)0x0;
  if ((param_1 != (char *)0x0) && (*param_1 != '\0')) {
    local_14 = param_1;
  }
  local_10 = (**(code **)(*g_pScriptVM + 0x40))(g_pScriptVM,param_2);
  CUtlVector<scriptTemplate_t,CUtlMemory<scriptTemplate_t,int>>::InsertBefore
            ((CUtlVector<scriptTemplate_t,CUtlMemory<scriptTemplate_t,int>> *)(this + 0x500),
             *(int *)(this + 0x50c),(scriptTemplate_t *)&local_14);
  return;
}

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)