L L4D2node

CTeamplayRoundBasedRules::CTeamplayRoundBasedRules

0x004cdc10 · 828 bytes · __thiscall

_ZN24CTeamplayRoundBasedRulesC2Ev

Decompiled

undefined (1 param)

/* CTeamplayRoundBasedRules::CTeamplayRoundBasedRules() */

void __thiscall CTeamplayRoundBasedRules::CTeamplayRoundBasedRules(CTeamplayRoundBasedRules *this)

{
  CTeamplayRoundBasedRules CVar1;
  int iVar2;
  int iVar3;
  CTeamplayRoundBasedRules *__s1;
  undefined4 local_20 [4];
  
  iVar3 = 0;
  CTeamplayRules::CTeamplayRules((CTeamplayRules *)this);
  *(undefined ***)this = &PTR_Name_00c20f68;
  *(undefined4 *)(this + 0x24c) = 0xffffffff;
  *(undefined4 *)(this + 600) = 0xffffffff;
  *(undefined4 *)(this + 0x25c) = 0xffffffff;
  *(undefined4 *)(this + 0x264) = 0xffffffff;
  *(undefined4 *)(this + 0x270) = 0;
  *(undefined4 *)(this + 0x274) = 0;
  *(undefined4 *)(this + 0x278) = 0;
  *(undefined4 *)(this + 0x27c) = 0;
  *(undefined4 *)(this + 0x280) = 0;
  __s1 = this + 0x334;
  do {
    local_20[0] = 0;
    iVar2 = memcmp(__s1,local_20,4);
    if (iVar2 != 0) {
                    /* try { // try from 004cdd01 to 004cdf51 has its CatchHandler @ 004cdf5e */
      CGameRulesProxy::NotifyNetworkStateChanged();
      *(undefined4 *)(this + 0x334 + iVar3 * 4) = 0;
    }
    local_20[0] = 0xbf800000;
    iVar2 = memcmp(__s1 + 0xa4,local_20,4);
    if (iVar2 == 0) {
      CVar1 = this[iVar3 + 0x3b4];
    }
    else {
      CGameRulesProxy::NotifyNetworkStateChanged();
      *(undefined4 *)(this + iVar3 * 4 + 0x3d8) = 0xbf800000;
      CVar1 = this[iVar3 + 0x3b4];
    }
    if (CVar1 != (CTeamplayRoundBasedRules)0x0) {
      CGameRulesProxy::NotifyNetworkStateChanged();
      this[iVar3 + 0x3b4] = (CTeamplayRoundBasedRules)0x0;
    }
    *(undefined4 *)(__s1 + -0xac) = 0xbf800000;
    iVar3 = iVar3 + 1;
    __s1 = __s1 + 4;
  } while (iVar3 != 0x20);
  if (this[0x31c] != (CTeamplayRoundBasedRules)0x0) {
    CGameRulesProxy::NotifyNetworkStateChanged();
    this[0x31c] = (CTeamplayRoundBasedRules)0x0;
  }
  if (this[0x31d] != (CTeamplayRoundBasedRules)0x0) {
    CGameRulesProxy::NotifyNetworkStateChanged();
    this[0x31d] = (CTeamplayRoundBasedRules)0x0;
  }
  if (this[0x31e] != (CTeamplayRoundBasedRules)0x0) {
    CGameRulesProxy::NotifyNetworkStateChanged();
    this[0x31e] = (CTeamplayRoundBasedRules)0x0;
  }
  *(undefined4 *)(this + 0x468) = 0xbf800000;
  *(undefined4 *)(this + 0x240) = 0;
  State_Enter(this,1);
  ResetMapTime(this);
  ResetScores(this);
  this[0x268] = (CTeamplayRoundBasedRules)0x1;
  *(undefined4 *)(this + 0x26c) = 0;
  if (this[0x328] != (CTeamplayRoundBasedRules)0x0) {
    CGameRulesProxy::NotifyNetworkStateChanged();
    this[0x328] = (CTeamplayRoundBasedRules)0x0;
  }
  if (this[0x329] != (CTeamplayRoundBasedRules)0x0) {
    CGameRulesProxy::NotifyNetworkStateChanged();
    this[0x329] = (CTeamplayRoundBasedRules)0x0;
  }
  if (*(float *)(this + 0x32c) != -1.0) {
    CGameRulesProxy::NotifyNetworkStateChanged();
    *(undefined4 *)(this + 0x32c) = 0xbf800000;
  }
  if (*(float *)(this + 0x330) != 0.0) {
    CGameRulesProxy::NotifyNetworkStateChanged();
    *(undefined4 *)(this + 0x330) = 0;
  }
  this[0x269] = (CTeamplayRoundBasedRules)0x0;
  this[0x255] = (CTeamplayRoundBasedRules)0x1;
  this[0x256] = (CTeamplayRoundBasedRules)0x1;
  this[599] = (CTeamplayRoundBasedRules)0x1;
  if (*(int *)(this + 800) != 0) {
    CGameRulesProxy::NotifyNetworkStateChanged();
    *(undefined4 *)(this + 800) = 0;
  }
  *(undefined4 *)(this + 0x27c) = 0;
  *(undefined4 *)(this + 0x284) = 0;
  this[0x308] = (CTeamplayRoundBasedRules)0x0;
  this[0x309] = (CTeamplayRoundBasedRules)0x0;
  *(undefined4 *)(this + 0x30c) = 0;
  *(undefined4 *)(this + 0x458) = 0;
  this[0x460] = (CTeamplayRoundBasedRules)0x0;
  *(undefined4 *)(this + 0x464) = 0xbf800000;
  *(undefined4 *)(this + 0x248) = 0;
  *(undefined4 *)(this + 0x310) = 0;
  this[0x314] = (CTeamplayRoundBasedRules)0x0;
  if (this[0x3d4] != (CTeamplayRoundBasedRules)0x0) {
    CGameRulesProxy::NotifyNetworkStateChanged();
    this[0x3d4] = (CTeamplayRoundBasedRules)0x0;
  }
  if (this[0x329] != (CTeamplayRoundBasedRules)0x0) {
    CGameRulesProxy::NotifyNetworkStateChanged();
    this[0x329] = (CTeamplayRoundBasedRules)0x0;
  }
  if ((*(int *)(mp_tournament._28_4_ + 0x30) != 0) && (this[0x329] != (CTeamplayRoundBasedRules)0x1)
     ) {
    CGameRulesProxy::NotifyNetworkStateChanged();
    this[0x329] = (CTeamplayRoundBasedRules)0x1;
  }
  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)