L L4D2node

CTerrorGameRules::GetVersusTeamFor

0x00503820 · 68 bytes · __regparm3

_ZNK16CTerrorGameRules16GetVersusTeamForEi.part.146

Decompiled

undefined (1 param)

/* CTerrorGameRules::GetVersusTeamFor(int) const [clone .part.146] */

int __regparm3 CTerrorGameRules::GetVersusTeamFor(int param_1)

{
  char cVar1;
  
  cVar1 = CDirector::AreTeamsFlipped(TheDirector);
  if (param_1 == 2) {
    return 2 - (uint)(cVar1 == '\0');
  }
  if (param_1 != 3) {
    return 0;
  }
  return ~-(uint)(cVar1 == '\0') + 2;
}

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)