L L4D2node

CTerrorWeaponInfo::Precache

0x00574fb0 · 154 bytes · __thiscall

_ZNK17CTerrorWeaponInfo8PrecacheEv

Decompiled

undefined (1 param)

/* CTerrorWeaponInfo::Precache() const */

void __thiscall CTerrorWeaponInfo::Precache(CTerrorWeaponInfo *this)

{
  ushort uVar1;
  
  CCSWeaponInfo::Precache((CCSWeaponInfo *)this);
  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((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)); 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((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),uVar1)) {
    CBaseEntity::PrecacheModel(*(char **)((uint)uVar1 * 0x10 + *(int *)(this + 0xc60) + 0xc));
  }
  if (this[0xc78] != (CTerrorWeaponInfo)0x0) {
    CBaseEntity::PrecacheModel((char *)(this + 0xc78));
  }
  if (this[0xd80] == (CTerrorWeaponInfo)0x0) {
    return;
  }
  CBaseEntity::PrecacheModel((char *)(this + 0xd80));
  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)