L L4D2node

CTerrorWeaponInfo::RemoveViewmodels

0x005714b0 · 133 bytes · __thiscall

_ZN17CTerrorWeaponInfo16RemoveViewmodelsEv

Decompiled

undefined (1 param)

/* CTerrorWeaponInfo::RemoveViewmodels() */

void __thiscall CTerrorWeaponInfo::RemoveViewmodels(CTerrorWeaponInfo *this)

{
  CUtlRBTree<CUtlMap<char_const*,char_const*,unsigned_short>::Node_t,unsigned_short,CUtlMap<char_const*,char_const*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,char_const*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
  *this_00;
  ushort uVar1;
  int iVar2;
  
  this_00 = (CUtlRBTree<CUtlMap<char_const*,char_const*,unsigned_short>::Node_t,unsigned_short,CUtlMap<char_const*,char_const*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,char_const*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
             *)(this + 0xc5c);
  for (uVar1 = CUtlRBTree<CUtlMap<char_const*,char_const*,unsigned_short>::Node_t,unsigned_short,CUtlMap<char_const*,char_const*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,char_const*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
               ::FirstInorder(this_00); uVar1 != 0xffff;
      uVar1 = CUtlRBTree<CUtlMap<char_const*,char_const*,unsigned_short>::Node_t,unsigned_short,CUtlMap<char_const*,char_const*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,char_const*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
              ::NextInorder(this_00,uVar1)) {
    iVar2 = *(int *)(this + 0xc60) + (uint)uVar1 * 0x10;
    if (*(void **)(iVar2 + 8) != (void *)0x0) {
      operator_delete__(*(void **)(iVar2 + 8));
      iVar2 = *(int *)(this + 0xc60) + (uint)uVar1 * 0x10;
    }
    if (*(void **)(iVar2 + 0xc) != (void *)0x0) {
      operator_delete__(*(void **)(iVar2 + 0xc));
    }
  }
  CUtlRBTree<CUtlMap<char_const*,char_const*,unsigned_short>::Node_t,unsigned_short,CUtlMap<char_const*,char_const*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,char_const*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
  ::RemoveAll(this_00);
  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)