L L4D2node

Templates_RemoveByHammerID

0x0083d9a0 · 152 bytes · __cdecl

_Z26Templates_RemoveByHammerIDi

Decompiled

undefined (1 param)

/* Templates_RemoveByHammerID(int) */

void Templates_RemoveByHammerID(int param_1)

{
  int iVar1;
  TemplateEntityData_t *pTVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  
  iVar4 = DAT_00ffa750 + -1;
  iVar5 = DAT_00ffa750 * 4;
  if (-1 < iVar4) {
    do {
      while( true ) {
        iVar1 = iVar5 + -4;
        pTVar2 = *(TemplateEntityData_t **)(g_Templates + -4 + iVar5);
        if (*(int *)(pTVar2 + 0x18) != param_1) break;
        Templates_FreeTemplate(pTVar2);
        iVar3 = (DAT_00ffa750 - iVar4) + -1;
        if (0 < iVar3) {
          _V_memmove((void *)(g_Templates + iVar1),(void *)(iVar5 + g_Templates),iVar3 * 4);
        }
        iVar4 = iVar4 + -1;
        DAT_00ffa750 = DAT_00ffa750 + -1;
        iVar5 = iVar1;
        if (iVar4 == -1) {
          return;
        }
      }
      iVar4 = iVar4 + -1;
      iVar5 = iVar1;
    } while (iVar4 != -1);
  }
  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)