L L4D2node

CTerrorPlayer::UpdateTankEffects

0x009fe650 · 1166 bytes · __thiscall

_ZN13CTerrorPlayer17UpdateTankEffectsEv

Decompiled

undefined (1 param)

/* CTerrorPlayer::UpdateTankEffects() */

void __thiscall CTerrorPlayer::UpdateTankEffects(CTerrorPlayer *this)

{
  CountdownTimer *this_00;
  float fVar1;
  uint uVar2;
  int *piVar3;
  undefined4 uVar4;
  char cVar5;
  int *piVar6;
  int iVar7;
  int iVar8;
  undefined *puVar9;
  longdouble lVar10;
  float fVar11;
  float fVar12;
  
  this_00 = (CountdownTimer *)(this + 0x2bb4);
  lVar10 = (longdouble)CountdownTimer::Now();
  if (*(float *)(this + 0x2bbc) <= (float)lVar10) {
    lVar10 = (longdouble)CountdownTimer::Now();
    if ((float)lVar10 + 0.1 != *(float *)(this + 0x2bbc)) {
      (**(code **)(*(int *)(this + 0x2bb4) + 4))(this_00,this + 0x2bbc);
      *(float *)(this + 0x2bbc) = (float)lVar10 + 0.1;
    }
    if (*(float *)(this + 0x2bb8) != 0.1) {
      (**(code **)(*(int *)(this + 0x2bb4) + 4))(this_00,this + 0x2bb8);
      *(undefined4 *)(this + 0x2bb8) = 0x3dcccccd;
    }
    if (((byte)this[0x14d] & 0x10) != 0) {
      CBaseEntity::CalcAbsoluteVelocity((CBaseEntity *)this);
    }
    if (((((((*(float *)(this + 0x274) <= -0.01) || (0.01 <= *(float *)(this + 0x274))) ||
           (*(float *)(this + 0x278) <= -0.01)) ||
          ((0.01 <= *(float *)(this + 0x278) || (*(float *)(this + 0x27c) <= -0.01)))) ||
         (0.01 <= *(float *)(this + 0x27c))) &&
        (((cVar5 = (**(code **)(*(int *)this + 0x840))(this), cVar5 != '\0' &&
          (piVar6 = (int *)GetActiveTerrorWeapon(this), piVar6 != (int *)0x0)) &&
         ((cVar5 = (**(code **)(*piVar6 + 0x610))(piVar6), cVar5 == '\0' &&
          ((((char)piVar6[0x55e] == '\0' && (uVar2 = *(uint *)(this + 0x30bc), uVar2 != 0xffffffff))
           && (puVar9 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar9 != (undefined *)0xfffffffc)))
          ))))) &&
       (((*(uint *)(puVar9 + 8) == uVar2 >> 0xc &&
         (piVar3 = *(int **)(puVar9 + 4), piVar3 != (int *)0x0)) &&
        (cVar5 = (**(code **)(*piVar3 + 0x354))(piVar3), cVar5 == '\0')))) {
      iVar7 = CBaseAnimating::LookupAttachment((CBaseAnimating *)this,"lshoulder");
      if ((iVar7 < 1) ||
         ((cVar5 = TestWallIntersection(this,iVar7), cVar5 == '\0' &&
          ((iVar7 = CBaseAnimating::LookupAttachment((CBaseAnimating *)this,"lelbow"), iVar7 < 1 ||
           (cVar5 = TestWallIntersection(this,iVar7), cVar5 == '\0')))))) {
        iVar7 = CBaseAnimating::LookupAttachment((CBaseAnimating *)this,"rshoulder");
        if (iVar7 < 1) {
          return;
        }
        cVar5 = TestWallIntersection(this,iVar7);
        if (cVar5 == '\0') {
          iVar7 = CBaseAnimating::LookupAttachment((CBaseAnimating *)this,"relbow");
          if (iVar7 < 1) {
            return;
          }
          cVar5 = TestWallIntersection(this,iVar7);
          if (cVar5 == '\0') {
            return;
          }
        }
        iVar7 = (**(code **)(*(int *)this + 0x340))(this,0x31d);
        if (iVar7 < 1) {
          return;
        }
        CountdownTimer::Start(this_00,2.0);
        (**(code **)(*piVar6 + 0x3f0))(piVar6,0xbf);
        fVar1 = (float)piVar6[0x4ff];
        fVar12 = *(float *)(HulkSwingMissInterval._28_4_ + 0x2c);
        fVar11 = *(float *)(gpGlobals + 0xc) + fVar12;
        if (fVar11 <= fVar1) {
          fVar11 = fVar1;
        }
        if (fVar1 != fVar11) {
          CServerNetworkProperty::NetworkStateChanged((short)piVar6 + 0x24);
          uVar4 = HulkSwingMissInterval._28_4_;
          piVar6[0x4ff] = (int)fVar11;
          fVar12 = *(float *)(uVar4 + 0x2c);
        }
        (**(code **)(*piVar3 + 0x340))(piVar3,fVar12);
        iVar8 = *(int *)this;
      }
      else {
        iVar7 = (**(code **)(*(int *)this + 0x340))(this,0x31c);
        if (iVar7 < 1) {
          return;
        }
        lVar10 = (longdouble)CountdownTimer::Now();
        if ((float)lVar10 + 2.0 != *(float *)(this + 0x2bbc)) {
          (**(code **)(*(int *)(this + 0x2bb4) + 4))(this_00,this + 0x2bbc);
          *(float *)(this + 0x2bbc) = (float)lVar10 + 2.0;
        }
        if (*(float *)(this + 0x2bb8) != 2.0) {
          (**(code **)(*(int *)(this + 0x2bb4) + 4))(this_00,this + 0x2bb8);
          *(undefined4 *)(this + 0x2bb8) = 0x40000000;
        }
        (**(code **)(*piVar6 + 0x3f0))(piVar6,0xbf);
        fVar1 = (float)piVar6[0x4ff];
        fVar12 = *(float *)(HulkSwingMissInterval._28_4_ + 0x2c);
        fVar11 = *(float *)(gpGlobals + 0xc) + fVar12;
        if (fVar11 <= fVar1) {
          fVar11 = fVar1;
        }
        if (fVar11 != fVar1) {
          CServerNetworkProperty::NetworkStateChanged((short)piVar6 + 0x24);
          uVar4 = HulkSwingMissInterval._28_4_;
          piVar6[0x4ff] = (int)fVar11;
          fVar12 = *(float *)(uVar4 + 0x2c);
        }
        (**(code **)(*piVar3 + 0x340))(piVar3,fVar12);
        iVar8 = *(int *)this;
      }
      (**(code **)(iVar8 + 0x7fc))(this,0x21,iVar7);
      Vocalize(this,"HulkZombie.Attack",0.0,0.0);
    }
  }
  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)