L L4D2node

CAmmoDef::AddAmmoType

0x003fa7b0 · 119 bytes · __thiscall

_ZN8CAmmoDef11AddAmmoTypeEPKciiiiifiii

Decompiled

undefined (11 params)

/* CAmmoDef::AddAmmoType(char const*, int, int, int, int, int, float, int, int, int) */

void __thiscall
CAmmoDef::AddAmmoType
          (CAmmoDef *this,char *param_1,int param_2,int param_3,int param_4,int param_5,int param_6,
          float param_7,int param_8,int param_9,int param_10)

{
  int iVar1;
  char cVar2;
  
  cVar2 = AddAmmoType(this,param_1,param_2,param_3,param_8,param_9,param_10);
  if (cVar2 != '\0') {
    iVar1 = *(int *)(this + 4);
    *(int *)(this + iVar1 * 0x34 + 0x24) = param_4;
    *(float *)(this + iVar1 * 0x34 + 0x14) = param_7;
    *(int *)(this + iVar1 * 0x34 + 0x28) = param_5;
    *(int *)(this + iVar1 * 0x34 + 0x2c) = param_6;
    *(int *)(this + 4) = iVar1 + 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)