L L4D2node

CTerrorGameRules::IsVersusMode

0x005062d0 · 146 bytes · __cdecl

_ZN16CTerrorGameRules12IsVersusModeEv

Decompiled

undefined (0 params)

/* CTerrorGameRules::IsVersusMode() */

bool CTerrorGameRules::IsVersusMode(void)

{
  KeyValues *this;
  char *pcVar1;
  int iVar2;
  undefined1 *puVar3;
  
  if (g_pMatchExtL4D == (int *)0x0) {
    return false;
  }
  if ((mp_gamemode[0x15] & 0x10) == 0) {
    puVar3 = &DAT_00d539c2;
    if (*(undefined1 **)(mp_gamemode._28_4_ + 0x24) != (undefined1 *)0x0) {
      puVar3 = *(undefined1 **)(mp_gamemode._28_4_ + 0x24);
    }
    this = (KeyValues *)(**(code **)(*g_pMatchExtL4D + 0x10))(g_pMatchExtL4D,puVar3);
  }
  else {
    this = (KeyValues *)
           (**(code **)(*g_pMatchExtL4D + 0x10))(g_pMatchExtL4D,"FCVAR_NEVER_AS_STRING");
  }
  if (this != (KeyValues *)0x0) {
    pcVar1 = (char *)KeyValues::GetString(this,"base","");
    iVar2 = _V_stricmp(pcVar1,"versus");
    return iVar2 == 0;
  }
  return false;
}

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)