L L4D2node

CTerrorPlayer::ProcessDamageForTankPhysicsProjectile

0x009aef90 · 866 bytes · __thiscall

_ZN13CTerrorPlayer37ProcessDamageForTankPhysicsProjectileERK15CTakeDamageInfo

Decompiled

undefined (2 params)

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

void __thiscall
CTerrorPlayer::ProcessDamageForTankPhysicsProjectile(CTerrorPlayer *this,CTakeDamageInfo *param_1)

{
  uint uVar1;
  float fVar2;
  char cVar3;
  int iVar4;
  CBaseEntity *this_00;
  undefined *puVar5;
  undefined *puVar6;
  CTakeDamageInfo *pCVar7;
  Vector *pVVar8;
  byte bVar9;
  longdouble lVar10;
  CPhysicsProp *local_30;
  Vector local_28 [24];
  
  bVar9 = 0;
  if (((((((1.0 < *(float *)(param_1 + 0x3c) || *(float *)(param_1 + 0x3c) == 1.0) &&
          (((byte)param_1[0x48] & 1) != 0)) &&
         (cVar3 = (**(code **)(*(int *)this + 300))(this), cVar3 != '\0')) &&
        (((cVar3 = IsInvulnerable(this), cVar3 == '\0' &&
          (cVar3 = (**(code **)(*(int *)this + 0x7e8))(this), cVar3 == '\0')) &&
         ((this[0x39f1] == (CTerrorPlayer)0x0 &&
          ((this[0x39f2] == (CTerrorPlayer)0x0 && (cVar3 = IsGettingUp(this), cVar3 == '\0'))))))))
       && ((uVar1 = *(uint *)(this + 0x2e24), uVar1 == 0xffffffff ||
           (((puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc ||
             (*(uint *)(puVar5 + 8) != uVar1 >> 0xc)) || (*(int *)(puVar5 + 4) == 0)))))) &&
      (((iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)this), iVar4 != 3 ||
        (iVar4 = (**(code **)(*(int *)this + 0x544))(this), iVar4 != 8)) &&
       (((((puVar5 = g_pEntityList, uVar1 = *(uint *)(param_1 + 0x34), uVar1 != 0xffffffff &&
           ((puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc &&
            (*(uint *)(puVar6 + 8) == uVar1 >> 0xc)))) && (*(int *)(puVar6 + 4) != 0)) &&
         (local_30 = (CPhysicsProp *)
                     __dynamic_cast(*(int *)(puVar6 + 4),&CBaseEntity::typeinfo,
                                    &CPhysicsProp::typeinfo,0), local_30 != (CPhysicsProp *)0x0)) ||
        ((((uVar1 = *(uint *)(param_1 + 0x30), uVar1 != 0xffffffff &&
           (puVar5 = puVar5 + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
          (*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) &&
         ((*(int *)(puVar5 + 4) != 0 &&
          (local_30 = (CPhysicsProp *)
                      __dynamic_cast(*(int *)(puVar5 + 4),&CBaseEntity::typeinfo,
                                     &CPhysicsProp::typeinfo,0), local_30 != (CPhysicsProp *)0x0))))
        )))))) &&
     ((cVar3 = CPhysicsProp::IsPotentialTankProjectile(local_30), cVar3 != '\0' &&
      (cVar3 = CPhysicsProp::WasHitByTank(local_30), cVar3 != '\0')))) {
    fVar2 = *(float *)(param_1 + 0x3c);
    lVar10 = (longdouble)CDirector::GetTankDamage(TheDirector,(CBaseEntity *)this);
    if ((float)lVar10 <= fVar2) {
      OnKnockedDown(this,2);
    }
    else if (10.0 <= *(float *)(param_1 + 0x3c)) {
      pCVar7 = param_1 + 0xc;
      pVVar8 = local_28;
      for (iVar4 = 3; iVar4 != 0; iVar4 = iVar4 + -1) {
        *(undefined4 *)pVVar8 = *(undefined4 *)pCVar7;
        pCVar7 = pCVar7 + (uint)bVar9 * -8 + 4;
        pVVar8 = pVVar8 + ((uint)bVar9 * -2 + 1) * 4;
      }
      OnStaggered(this,(CBaseEntity *)local_30,local_28);
    }
    uVar1 = *(uint *)(param_1 + 0x34);
    if (((((uVar1 != 0xffffffff) &&
          (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
         ((*(uint *)(puVar5 + 8) == uVar1 >> 0xc &&
          (((this_00 = *(CBaseEntity **)(puVar5 + 4), this_00 != (CBaseEntity *)0x0 &&
            (cVar3 = (**(code **)(*(int *)this_00 + 0x16c))(this_00), cVar3 != '\0')) &&
           (iVar4 = CBaseEntity::GetTeamNumber(this_00), iVar4 == 3)))))) &&
        (iVar4 = (**(code **)(*(int *)this_00 + 0x544))(this_00), iVar4 == 8)) ||
       (((this_00 = (CBaseEntity *)(**(code **)(*(int *)local_30 + 0x2c4))(local_30,0x40000000),
         this_00 != (CBaseEntity *)0x0 &&
         (cVar3 = (**(code **)(*(int *)this_00 + 0x16c))(this_00), cVar3 != '\0')) &&
        ((iVar4 = CBaseEntity::GetTeamNumber(this_00), iVar4 == 3 &&
         (iVar4 = (**(code **)(*(int *)this_00 + 0x544))(this_00), iVar4 == 8)))))) {
      (**(code **)(*(int *)this_00 + 0x8fc))(this_00,this,0);
      ResetFrustrationLevel((CTerrorPlayer *)this_00);
    }
  }
  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)