L L4D2node

CTeamplayRoundBasedRules::State_LookupInfo

0x004caa90 · 66 bytes · __cdecl

_ZN24CTeamplayRoundBasedRules16State_LookupInfoE22gamerules_roundstate_t

Decompiled

undefined (1 param)

/* CTeamplayRoundBasedRules::State_LookupInfo(gamerules_roundstate_t) */

undefined4 * CTeamplayRoundBasedRules::State_LookupInfo(int param_1)

{
  int iVar1;
  
  if (State_LookupInfo(gamerules_roundstate_t)::playerStateInfos == param_1) {
    iVar1 = 0;
  }
  else {
    iVar1 = 1;
    while ((&State_LookupInfo(gamerules_roundstate_t)::playerStateInfos)[iVar1 * 8] != param_1) {
      iVar1 = iVar1 + 1;
      if (iVar1 == 9) {
        return (undefined4 *)0x0;
      }
    }
  }
  return &State_LookupInfo(gamerules_roundstate_t)::playerStateInfos + iVar1 * 8;
}

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)