L L4D2node

CTerrorGameRules::GetRoundDuration

0x00507340 · 101 bytes · __thiscall

_ZNK16CTerrorGameRules16GetRoundDurationEi

Decompiled

undefined (2 params)

/* CTerrorGameRules::GetRoundDuration(int) const */

longdouble __thiscall CTerrorGameRules::GetRoundDuration(CTerrorGameRules *this,int param_1)

{
  char cVar1;
  int iVar2;
  longdouble lVar3;
  
  if (((param_1 == 2) && (*(float *)(this + 0x444) != 0.0)) && (*(float *)(this + 0x448) == 0.0)) {
    lVar3 = (longdouble)CalculateRoundDuration(this);
    return lVar3;
  }
  cVar1 = HasPlayerControlledZombies();
  iVar2 = 0;
  if (cVar1 != '\0') {
    iVar2 = GetVersusTeamFor(param_1);
    iVar2 = iVar2 + -1;
  }
  return (longdouble)*(float *)(this + iVar2 * 4 + 0x470);
}

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)