L L4D2node

CMultiplayRules::Think

0x0046fd10 · 197 bytes · __thiscall

_ZN15CMultiplayRules5ThinkEv

Decompiled

undefined (1 param)

/* CMultiplayRules::Think() */

void __thiscall CMultiplayRules::Think(CMultiplayRules *this)

{
  float fVar1;
  int iVar2;
  int iVar3;
  float fVar4;
  
  CGameRules::Think((CGameRules *)this);
  if (g_fGameOver != '\0') {
                    /* WARNING: Could not recover jumptable at 0x0046fde1. Too many branches */
                    /* WARNING: Treating indirect jump as call */
    (**(code **)(*(int *)this + 0x244))();
    return;
  }
  fVar4 = *(float *)(mp_timelimit._28_4_ + 0x2c) * 60.0;
  fVar1 = *(float *)(fraglimit._28_4_ + 0x2c);
  if ((fVar4 != 0.0) &&
     (fVar4 < *(float *)(gpGlobals + 0xc) || fVar4 == *(float *)(gpGlobals + 0xc))) {
LAB_0046fdaf:
                    /* WARNING: Could not recover jumptable at 0x0046fdc0. Too many branches */
                    /* WARNING: Treating indirect jump as call */
    (**(code **)(*(int *)this + 0x248))();
    return;
  }
  if ((fVar1 != 0.0) && (0 < *(int *)(gpGlobals + 0x14))) {
    iVar3 = 1;
    do {
      iVar2 = UTIL_PlayerByIndex(iVar3);
      if ((iVar2 != 0) && (fVar1 <= (float)*(int *)(iVar2 + 0x1f5c))) goto LAB_0046fdaf;
      iVar3 = iVar3 + 1;
    } while (iVar3 <= *(int *)(gpGlobals + 0x14));
  }
  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)