L L4D2node

CTerrorGameRules::SetVersusDeathDistancePerCharacter

0x005066d0 · 96 bytes · __thiscall

_ZN16CTerrorGameRules34SetVersusDeathDistancePerCharacterE21SurvivorCharacterTypeii

Decompiled

undefined (4 params)

/* CTerrorGameRules::SetVersusDeathDistancePerCharacter(SurvivorCharacterType, int, int) */

void __thiscall
CTerrorGameRules::SetVersusDeathDistancePerCharacter
          (CTerrorGameRules *this,int param_2,int param_3,undefined4 param_4)

{
  char cVar1;
  int iVar2;
  int iVar3;
  
  iVar3 = 0;
  cVar1 = HasPlayerControlledZombies();
  if (cVar1 != '\0') {
    iVar3 = GetVersusTeamFor(param_3);
    iVar3 = iVar3 * 4 + -4;
  }
  iVar2 = memcmp(this + (iVar3 + param_2) * 4 + 0x404,&param_4,4);
  if (iVar2 != 0) {
    CGameRulesProxy::NotifyNetworkStateChanged();
    *(undefined4 *)(this + (iVar3 + param_2) * 4 + 0x404) = param_4;
  }
  return;
}

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)