L L4D2node

CBasePlayer::CheckSuitUpdate

0x007ae420 · 312 bytes · __thiscall

_ZN11CBasePlayer15CheckSuitUpdateEv

Decompiled

undefined (1 param)

/* CBasePlayer::CheckSuitUpdate() */

void __thiscall CBasePlayer::CheckSuitUpdate(CBasePlayer *this)

{
  float fVar1;
  int iVar2;
  char cVar3;
  int iVar4;
  undefined4 uVar5;
  int iVar6;
  int in_GS_OFFSET;
  char local_220 [512];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar6 = *(int *)(this + 0x1e34);
  if (this[0x1ac9] != (CBasePlayer)0x0) {
    (**(code **)(*(int *)this + 0x6fc))(this);
    cVar3 = (**(code **)(*g_pGameRules + 0x88))(g_pGameRules);
    if (((cVar3 == '\0') &&
        (fVar1 = *(float *)(this + 0x1e20),
        fVar1 < *(float *)(gpGlobals + 0xc) || fVar1 == *(float *)(gpGlobals + 0xc))) &&
       (iVar4 = 4, 0.0 < fVar1)) {
      do {
        iVar2 = *(int *)(this + (iVar6 + 0x788) * 4 + 4);
        if (iVar2 != 0) {
          *(undefined4 *)(this + (iVar6 + 0x788) * 4 + 4) = 0;
          if (iVar2 < 1) {
            UTIL_EmitGroupIDSuit(*(edict_t **)(this + 0x30),-iVar2);
          }
          else {
            uVar5 = (**(code **)(*engine + 0x84))(engine,iVar2);
            V_snprintf(local_220,0x200,"!%s",uVar5);
            UTIL_EmitSoundSuit(*(edict_t **)(this + 0x30),local_220);
          }
          *(float *)(this + 0x1e20) = *(float *)(gpGlobals + 0xc) + 3.5;
          goto LAB_007ae449;
        }
        iVar6 = iVar6 + 1;
        if (iVar6 == 4) {
          iVar6 = 0;
        }
        iVar4 = iVar4 + -1;
      } while (iVar4 != 0);
      *(undefined4 *)(this + 0x1e20) = 0;
    }
  }
LAB_007ae449:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

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)