L L4D2node

CTerrorPlayer::StopBeingRevived

0x009a8490 · 524 bytes · __thiscall

_ZN13CTerrorPlayer16StopBeingRevivedEb

Decompiled

undefined (2 params)

/* CTerrorPlayer::StopBeingRevived(bool) */

void __thiscall CTerrorPlayer::StopBeingRevived(CTerrorPlayer *this,bool param_1)

{
  CBaseEdict *pCVar1;
  CCSPlayer *this_00;
  int iVar2;
  uint uVar3;
  undefined *puVar4;
  int iVar5;
  
  CCSPlayer::SetProgressBarTime((CCSPlayer *)this,0.0);
  uVar3 = *(uint *)(this + 0x2e24);
  if (uVar3 == 0xffffffff) {
    uVar3 = 0xffffffff;
    goto LAB_009a84e9;
  }
  puVar4 = g_pEntityList + (uVar3 & 0xfff) * 0x10;
  if (((puVar4 == (undefined *)0xfffffffc) || (*(uint *)(puVar4 + 8) != uVar3 >> 0xc)) ||
     (this_00 = *(CCSPlayer **)(puVar4 + 4), this_00 == (CCSPlayer *)0x0)) goto LAB_009a84e9;
  (**(code **)(*(int *)this + 0x7fc))(this,0x30,0);
  (**(code **)(*(int *)this_00 + 0x7fc))(this_00,0x2e,0);
  if ((g_pEntityList == (undefined *)0xfffffffc) || (*(int *)(g_pEntityList + 8) != 0)) {
    iVar5 = 0;
  }
  else {
    iVar5 = *(int *)(g_pEntityList + 4);
  }
  uVar3 = *(uint *)(this_00 + 0x2e28);
  if (((uVar3 == 0xffffffff) ||
      (puVar4 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
     (*(uint *)(puVar4 + 8) != uVar3 >> 0xc)) {
    if (iVar5 != 0) {
LAB_009a8650:
      if (this_00[0x6c] == (CCSPlayer)0x0) {
        pCVar1 = *(CBaseEdict **)(this_00 + 0x30);
        if (pCVar1 != (CBaseEdict *)0x0) {
          *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
          iVar5 = CBaseEdict::GetChangeAccessor(pCVar1);
          *(undefined2 *)(iVar5 + 2) = 0;
        }
      }
      else {
        this_00[0x70] = (CCSPlayer)((byte)this_00[0x70] | 1);
      }
      *(undefined4 *)(this_00 + 0x2e28) = 0;
    }
  }
  else if (iVar5 != *(int *)(puVar4 + 4)) goto LAB_009a8650;
  CCSPlayer::SetProgressBarTime(this_00,0.0);
  if (param_1) {
    CBaseEntity::EmitSound((CBaseEntity *)this_00,"Player.StopVoice",0.0,(float *)0x0);
  }
  uVar3 = *(uint *)(this + 0x2e24);
LAB_009a84e9:
  if ((g_pEntityList == (undefined *)0xfffffffc) || (*(int *)(g_pEntityList + 8) != 0)) {
    iVar5 = 0;
  }
  else {
    iVar5 = *(int *)(g_pEntityList + 4);
  }
  if (((uVar3 == 0xffffffff) ||
      (puVar4 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
     (*(uint *)(puVar4 + 8) != uVar3 >> 0xc)) {
    iVar2 = 0;
  }
  else {
    iVar2 = *(int *)(puVar4 + 4);
  }
  if (iVar5 == iVar2) {
    StopUseActions(this);
    return;
  }
  if (this[0x6c] == (CTerrorPlayer)0x0) {
    pCVar1 = *(CBaseEdict **)(this + 0x30);
    if (pCVar1 != (CBaseEdict *)0x0) {
      *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
      iVar5 = CBaseEdict::GetChangeAccessor(pCVar1);
      *(undefined2 *)(iVar5 + 2) = 0;
    }
    *(undefined4 *)(this + 0x2e24) = 0;
  }
  else {
    this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
    *(undefined4 *)(this + 0x2e24) = 0;
  }
  StopUseActions(this);
  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)