L L4D2node

CTerrorGameRules::IsRiverCampaign

0x00507190 · 66 bytes · __cdecl

_ZN16CTerrorGameRules15IsRiverCampaignEv

Decompiled

undefined (0 params)

/* CTerrorGameRules::IsRiverCampaign() */

bool CTerrorGameRules::IsRiverCampaign(void)

{
  KeyValues *this;
  char *pcVar1;
  int iVar2;
  bool bVar3;
  
  this = (KeyValues *)GetMissionInfo();
  bVar3 = false;
  if (this != (KeyValues *)0x0) {
    pcVar1 = (char *)KeyValues::GetString(this,"Name","");
    iVar2 = _V_strcmp("L4D2C7",pcVar1);
    bVar3 = iVar2 == 0;
  }
  return bVar3;
}

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)