L L4D2node

CCSPlayer::State_Enter_DEATH_ANIM

0x006535b0 · 797 bytes · __thiscall

_ZN9CCSPlayer22State_Enter_DEATH_ANIMEv

Decompiled

undefined (1 param)

/* CCSPlayer::State_Enter_DEATH_ANIM() */

void __thiscall CCSPlayer::State_Enter_DEATH_ANIM(CCSPlayer *this)

{
  float fVar1;
  uint *puVar2;
  CBaseEdict *this_00;
  char cVar3;
  float *pfVar4;
  undefined4 *puVar5;
  int iVar6;
  uint *puVar7;
  undefined *puVar8;
  undefined4 *puVar9;
  undefined4 *puVar10;
  uint uVar11;
  float local_58;
  float local_54;
  float local_50;
  float local_4c;
  float local_48;
  float local_44;
  undefined4 local_40;
  undefined4 local_3c;
  undefined4 local_38;
  float local_34;
  float local_30;
  float local_2c;
  float local_28;
  float local_24;
  float local_20;
  
  puVar9 = (undefined4 *)&stack0xffffff84;
  puVar10 = (undefined4 *)&stack0xffffff84;
  cVar3 = CBasePlayer::HasWeapons((CBasePlayer *)this);
  if (cVar3 != '\0') {
    (**(code **)(*(int *)this + 0x5c0))();
  }
  fVar1 = *(float *)(gpGlobals + 0xc);
  if (fVar1 != *(float *)(this + 0x1d5c)) {
    if (this[0x6c] == (CCSPlayer)0x0) {
      this_00 = *(CBaseEdict **)(this + 0x30);
      if (this_00 != (CBaseEdict *)0x0) {
        *(uint *)this_00 = *(uint *)this_00 | 0x101;
        iVar6 = CBaseEdict::GetChangeAccessor(this_00);
        *(undefined2 *)(iVar6 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CCSPlayer)((byte)this[0x70] | 1);
    }
    *(float *)(this + 0x1d5c) = fVar1;
  }
  if (((byte)this[0x14d] & 8) != 0) {
    CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
  }
  local_58 = *(float *)(this + 0x2e0);
  local_54 = *(float *)(this + 0x2e4);
  local_50 = *(float *)(this + 0x2e8);
  pfVar4 = (float *)(**(code **)(*(int *)this + 0x250))();
  local_4c = *pfVar4;
  local_48 = pfVar4[1];
  local_44 = pfVar4[2];
  puVar5 = (undefined4 *)(**(code **)(*(int *)this + 0x238))();
  local_40 = *puVar5;
  local_3c = puVar5[1];
  local_38 = puVar5[2];
  (**(code **)(*(int *)this + 0x638))();
  CBaseEntity::SetAbsOrigin((CBaseEntity *)this,(Vector *)&local_58);
  (**(code **)(*(int *)this + 0x254))();
  if (this == (CCSPlayer *)0x0) {
LAB_0065368e:
    uVar11 = *(uint *)(this + 0x1d7c);
    puVar9 = (undefined4 *)&stack0xffffff84;
    if ((((uVar11 != 0xffffffff) &&
         (puVar8 = g_pEntityList + (uVar11 & 0xfff) * 0x10, puVar9 = (undefined4 *)&stack0xffffff84,
         puVar8 != (undefined *)0xfffffffc)) &&
        (puVar9 = (undefined4 *)&stack0xffffff84, *(uint *)(puVar8 + 8) == uVar11 >> 0xc)) &&
       (puVar9 = (undefined4 *)&stack0xffffff84, *(int **)(puVar8 + 4) != (int *)0x0)) {
      (**(code **)(**(int **)(puVar8 + 4) + 0x234))();
      puVar9 = (undefined4 *)&stack0xffffff80;
      local_30 = (local_48 + local_24) - local_54;
      local_2c = (local_44 + local_20) - local_50;
      local_34 = (local_4c + local_28) - local_58;
      VectorNormalize((Vector *)&local_34);
      VectorAngles((Vector *)&local_34,(QAngle *)&local_28);
      CBasePlayer::SnapEyeAngles((CBasePlayer *)this,(QAngle *)&local_28);
    }
    uVar11 = *(uint *)(this + 0xd4) & 0xffffffdf;
    puVar10 = puVar9;
    if (*(uint *)(this + 0xd4) == uVar11) {
LAB_006537ab:
      puVar7 = *(uint **)(this + 0x30);
      goto LAB_00653700;
    }
  }
  else {
    cVar3 = (**(code **)(*(int *)this + 0x16c))();
    if (cVar3 == '\0') goto LAB_0065368e;
    iVar6 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
    if (iVar6 == 3) {
      iVar6 = (**(code **)(*(int *)this + 0x544))();
      if (iVar6 != 8) goto LAB_00653771;
      CBasePlayer::SnapEyeAngles((CBasePlayer *)this,(QAngle *)&local_40);
    }
    else {
LAB_00653771:
      iVar6 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
      cVar3 = IsASurvivorTeam(iVar6);
      if (cVar3 == '\0') goto LAB_0065368e;
      CBasePlayer::SnapEyeAngles((CBasePlayer *)this,(QAngle *)&local_40);
    }
    uVar11 = *(uint *)(this + 0xd4) & 0xffffffdf;
    if (*(uint *)(this + 0xd4) == uVar11) goto LAB_006537ab;
  }
  if (this[0x6c] == (CCSPlayer)0x0) {
    puVar2 = *(uint **)(this + 0x30);
    puVar7 = (uint *)0x0;
    if (puVar2 != (uint *)0x0) {
      *puVar2 = *puVar2 | 0x101;
      *puVar10 = puVar2;
      puVar10[-1] = 0x6536f1;
      iVar6 = CBaseEdict::GetChangeAccessor((CBaseEdict *)*puVar10);
      *(undefined2 *)(iVar6 + 2) = 0;
      puVar7 = *(uint **)(this + 0x30);
    }
  }
  else {
    this[0x70] = (CCSPlayer)((byte)this[0x70] | 1);
    puVar7 = *(uint **)(this + 0x30);
  }
  *(uint *)(this + 0xd4) = uVar11;
  puVar9 = puVar10;
LAB_00653700:
  if (puVar7 != (uint *)0x0) {
    *puVar7 = *puVar7 | 0x80;
  }
  *puVar9 = this;
  puVar9[-1] = 0x653712;
  CBaseEntity::DispatchUpdateTransmitState((CBaseEntity *)*puVar9);
  if (*(int *)(mp_fadetoblack._28_4_ + 0x30) != 0) {
    puVar9[4] = 10;
    puVar9[3] = 0x40400000;
    puVar9[2] = 0x40400000;
    puVar9[1] = &local_28;
    *puVar9 = this;
    local_28 = -1.7014118e+38;
    puVar9[-1] = 0x653755;
    UTIL_ScreenFade((CBaseEntity *)*puVar9,(color32_s *)puVar9[1],(float)puVar9[2],(float)puVar9[3],
                    puVar9[4]);
  }
  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)