L L4D2node

CResponseSystem::LookupEnumeration

0x005b7e70 · 143 bytes · __thiscall

_ZN15CResponseSystem17LookupEnumerationEPKcRb

Decompiled

undefined (3 params)

/* CResponseSystem::LookupEnumeration(char const*, bool&) */

longdouble __thiscall
CResponseSystem::LookupEnumeration(CResponseSystem *this,char *param_1,bool *param_2)

{
  byte bVar1;
  ushort uVar2;
  int local_14 [2];
  
  local_14[0] = -0x55555556;
  bVar1 = *param_1;
  while (bVar1 != 0) {
    param_1 = param_1 + 1;
    local_14[0] = (uint)bVar1 + local_14[0] * 0x21;
    bVar1 = *param_1;
  }
  uVar2 = CUtlRBTree<CUtlMap<unsigned_int,CResponseSystem::Enumeration,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,CResponseSystem::Enumeration,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,CResponseSystem::Enumeration,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
          ::Find((CUtlRBTree<CUtlMap<unsigned_int,CResponseSystem::Enumeration,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,CResponseSystem::Enumeration,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,CResponseSystem::Enumeration,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                  *)(this + 0x387c),(Node_t *)local_14);
  if (uVar2 != 0xffff) {
    *param_2 = true;
    return (longdouble)*(float *)((uint)uVar2 * 0x10 + *(int *)(this + 0x3880) + 0xc);
  }
  *param_2 = false;
  return (longdouble)0.0;
}

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)