L L4D2node

CTerrorWeaponInfo::GetViewModelAddonName

0x00571540 · 75 bytes · __cdecl

_ZNK17CTerrorWeaponInfo21GetViewModelAddonNameEPKcb

Decompiled

undefined (2 params)

/* CTerrorWeaponInfo::GetViewModelAddonName(char const*, bool) const */

undefined1 * CTerrorWeaponInfo::GetViewModelAddonName(char *param_1,bool param_2)

{
  ushort uVar1;
  undefined3 in_stack_00000009;
  undefined4 local_14 [3];
  
  local_14[0] = _param_2;
  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>>
          ::Find((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>>
                  *)(param_1 + 0xc5c),(Node_t *)local_14);
  if (uVar1 != 0xffff) {
    return *(undefined1 **)((uint)uVar1 * 0x10 + *(int *)(param_1 + 0xc60) + 0xc);
  }
  return &DAT_00d539c2;
}

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)