L L4D2node

CCSGameRules::TeamStacked

0x00437d10 · 119 bytes · __thiscall

_ZN12CCSGameRules11TeamStackedEii

Decompiled

undefined (3 params)

/* CCSGameRules::TeamStacked(int, int) */

bool __thiscall CCSGameRules::TeamStacked(CCSGameRules *this,int param_1,int param_2)

{
  int iVar1;
  bool bVar2;
  
  if (param_1 == param_2) {
    return false;
  }
  iVar1 = *(int *)(mp_limitteams._28_4_ + 0x30);
  bVar2 = false;
  if (iVar1 != 0) {
    if (param_1 == 2) {
      if (1 < (uint)param_2) {
        return iVar1 + *(int *)(this + 0x270) + -1 <= *(int *)(this + 0x26c);
      }
      return iVar1 + *(int *)(this + 0x270) <= *(int *)(this + 0x26c);
    }
    if (param_1 == 3) {
      if ((uint)param_2 < 2) {
        return iVar1 + *(int *)(this + 0x26c) <= *(int *)(this + 0x270);
      }
      bVar2 = iVar1 + *(int *)(this + 0x26c) + -1 <= *(int *)(this + 0x270);
    }
  }
  return bVar2;
}

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)