L L4D2node

CTerrorPlayer::UpdateZombieIncapacitation

0x009fdcc0 · 441 bytes · __thiscall

_ZN13CTerrorPlayer26UpdateZombieIncapacitationEv

Decompiled

undefined (1 param)

/* CTerrorPlayer::UpdateZombieIncapacitation() */

void __thiscall CTerrorPlayer::UpdateZombieIncapacitation(CTerrorPlayer *this)

{
  uint uVar1;
  byte *pbVar2;
  int *piVar3;
  CBaseEntity *pCVar4;
  CBaseEntity *pCVar5;
  undefined4 uVar6;
  int iVar7;
  undefined *puVar8;
  float local_70;
  CTakeDamageInfo local_6c [96];
  
  local_70 = *(float *)(ZombieHulkIncapacitatedDecayRate._28_4_ + 0x2c);
  if ((this[0x488] != (CTerrorPlayer)0x0) &&
     ((iVar7 = CMultiPlayerAnimState::GetMainActivity(*(CMultiPlayerAnimState **)(this + 0x2910)),
      iVar7 == 0x29d ||
      (iVar7 = CMultiPlayerAnimState::GetMainActivity(*(CMultiPlayerAnimState **)(this + 0x2910)),
      iVar7 == 0x29b)))) {
    local_70 = *(float *)(ZombieHulkIncapacitatedHealth._28_4_ + 0x2c);
  }
  if (*(int *)(l4d_show_incapupdate._28_4_ + 0x30) != 0) {
    uVar6 = (**(code **)(*(int *)this + 0x5ac))(this);
    Msg("%s: delta = %f\n",uVar6,(double)local_70);
  }
  uVar1 = *(uint *)(this + 0x2da8);
  if ((((uVar1 == 0xffffffff) ||
       (puVar8 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar8 == (undefined *)0xfffffffc)) ||
      (*(uint *)(puVar8 + 8) != uVar1 >> 0xc)) ||
     (pCVar5 = *(CBaseEntity **)(puVar8 + 4), pCVar4 = pCVar5, pCVar5 == (CBaseEntity *)0x0)) {
    pbVar2 = *(byte **)(gpGlobals + 0x58);
    if (((pbVar2 == (byte *)0x0) || ((*pbVar2 & 2) != 0)) ||
       (piVar3 = *(int **)(pbVar2 + 0xc), piVar3 == (int *)0x0)) {
      pCVar4 = (CBaseEntity *)0x0;
      pCVar5 = (CBaseEntity *)0x0;
    }
    else {
      pCVar4 = (CBaseEntity *)(**(code **)(*piVar3 + 0x18))(piVar3);
      pbVar2 = *(byte **)(gpGlobals + 0x58);
      if (((pbVar2 == (byte *)0x0) || ((*pbVar2 & 2) != 0)) ||
         (piVar3 = *(int **)(pbVar2 + 0xc), piVar3 == (int *)0x0)) {
        pCVar5 = (CBaseEntity *)0x0;
      }
      else {
        pCVar5 = (CBaseEntity *)(**(code **)(*piVar3 + 0x18))(piVar3);
      }
    }
  }
  CTakeDamageInfo::CTakeDamageInfo(local_6c,pCVar5,pCVar4,local_70,0x20000,0);
  CBaseEntity::TakeDamage((CBaseEntity *)this,local_6c);
  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)