L L4D2node

CTerrorPlayer::StartSurvivorDeathAnim

0x009af370 · 926 bytes · __thiscall

_ZN13CTerrorPlayer22StartSurvivorDeathAnimERK15CTakeDamageInfo

Decompiled

undefined (2 params)

/* CTerrorPlayer::StartSurvivorDeathAnim(CTakeDamageInfo const&) */

undefined4 __thiscall
CTerrorPlayer::StartSurvivorDeathAnim(CTerrorPlayer *this,CTakeDamageInfo *param_1)

{
  code *pcVar1;
  int *piVar2;
  undefined4 uVar3;
  char cVar4;
  undefined4 uVar5;
  KeyValues *this_00;
  undefined *puVar6;
  longdouble lVar7;
  uint uVar8;
  undefined4 local_30;
  CAI_Concept local_24 [20];
  
  if ((((((byte)this[0x150] & 1) == 0) ||
       (cVar4 = (**(code **)(*(int *)this + 0x7e8))(this), cVar4 != '\0')) ||
      ((uVar8 = *(uint *)(this + 0x3e68), uVar8 != 0xffffffff &&
       (((puVar6 = g_pEntityList + (uVar8 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc &&
         (*(uint *)(puVar6 + 8) == uVar8 >> 0xc)) && (*(int *)(puVar6 + 4) != 0)))))) ||
     (*(int *)(SurvivorDeathAnims._28_4_ + 0x30) == 0)) {
    uVar5 = 0;
  }
  else {
    StopRevivingSomeone(this,true);
    CBasePlayer::ClearUseEntity((CBasePlayer *)this);
    SetPushEntity(this,(CBaseEntity *)0x0);
    StopUseActions(this);
    uVar8 = 10;
    (**(code **)(*(int *)this + 0x7fc))(this,10,0);
    *(undefined4 *)(this + 0x2dc0) = *(undefined4 *)param_1;
    *(undefined4 *)(this + 0x2dc4) = *(undefined4 *)(param_1 + 4);
    *(undefined4 *)(this + 0x2dc8) = *(undefined4 *)(param_1 + 8);
    *(undefined4 *)(this + 0x2dcc) = *(undefined4 *)(param_1 + 0xc);
    *(undefined4 *)(this + 0x2dd0) = *(undefined4 *)(param_1 + 0x10);
    *(undefined4 *)(this + 0x2dd4) = *(undefined4 *)(param_1 + 0x14);
    *(undefined4 *)(this + 0x2dd8) = *(undefined4 *)(param_1 + 0x18);
    *(undefined4 *)(this + 0x2ddc) = *(undefined4 *)(param_1 + 0x1c);
    *(undefined4 *)(this + 0x2de0) = *(undefined4 *)(param_1 + 0x20);
    *(undefined4 *)(this + 0x2de4) = *(undefined4 *)(param_1 + 0x24);
    *(undefined4 *)(this + 0x2de8) = *(undefined4 *)(param_1 + 0x28);
    *(undefined4 *)(this + 0x2dec) = *(undefined4 *)(param_1 + 0x2c);
    *(undefined4 *)(this + 0x2df0) = *(undefined4 *)(param_1 + 0x30);
    *(undefined4 *)(this + 0x2df4) = *(undefined4 *)(param_1 + 0x34);
    *(undefined4 *)(this + 0x2df8) = *(undefined4 *)(param_1 + 0x38);
    *(undefined4 *)(this + 0x2dfc) = *(undefined4 *)(param_1 + 0x3c);
    *(undefined4 *)(this + 0x2e00) = *(undefined4 *)(param_1 + 0x40);
    *(undefined4 *)(this + 0x2e04) = *(undefined4 *)(param_1 + 0x44);
    *(undefined4 *)(this + 0x2e08) = *(undefined4 *)(param_1 + 0x48);
    *(undefined4 *)(this + 0x2e0c) = *(undefined4 *)(param_1 + 0x4c);
    *(undefined4 *)(this + 0x2e10) = *(undefined4 *)(param_1 + 0x50);
    *(undefined4 *)(this + 0x2e14) = *(undefined4 *)(param_1 + 0x54);
    *(undefined4 *)(this + 0x2e18) = *(undefined4 *)(param_1 + 0x58);
    uVar5 = *(undefined4 *)(param_1 + 0x5c);
    *(undefined4 *)(this + 0x2dc0) = vec3_origin;
    *(undefined4 *)(this + 0x2dc4) = DAT_01053d4c;
    uVar3 = DAT_01053d50;
    *(undefined4 *)(this + 0x2e1c) = uVar5;
    *(undefined4 *)(this + 0x2dc8) = uVar3;
    this_00 = KeyValues::operator_new((KeyValues *)0x2c,uVar8);
                    /* try { // try from 009af59f to 009af5a3 has its CatchHandler @ 009af71d */
    KeyValues::KeyValues(this_00,"deathEvent",(IKeyValuesSystem *)0x0,false);
    piVar2 = g_pGameRules;
    *(KeyValues **)(this + 0x2e20) = this_00;
    local_30 = 0;
    uVar8 = *(uint *)(param_1 + 0x34);
    if (((uVar8 != 0xffffffff) &&
        (puVar6 = g_pEntityList + (uVar8 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
       (*(uint *)(puVar6 + 8) == uVar8 >> 0xc)) {
      local_30 = *(undefined4 *)(puVar6 + 4);
    }
    (**(code **)(*piVar2 + 0x2d4))(piVar2,this_00,local_30,this,param_1);
    pcVar1 = *(code **)(*(int *)this + 0x7b4);
    CAI_Concept::CAI_Concept(local_24,"PlayerDeath");
    (*pcVar1)(this,local_24,3,0,0,0,0);
    lVar7 = (longdouble)CountdownTimer::Now();
    if ((float)lVar7 + 15.0 != *(float *)(this + 0x30a0)) {
      (**(code **)(*(int *)(this + 0x3098) + 4))(this + 0x3098,this + 0x30a0);
      *(float *)(this + 0x30a0) = (float)lVar7 + 15.0;
    }
    uVar5 = 1;
    if (*(float *)(this + 0x309c) != 15.0) {
      (**(code **)(*(int *)(this + 0x3098) + 4))(this + 0x3098,this + 0x309c);
      uVar5 = 1;
      *(undefined4 *)(this + 0x309c) = 0x41700000;
    }
  }
  return uVar5;
}

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)