L L4D2node

WitchAngry::Growl

0x00a3ba60 · 732 bytes · __thiscall

_ZN10WitchAngry5GrowlEP5Witch

Decompiled

undefined (2 params)

/* WitchAngry::Growl(Witch*) */

void __thiscall WitchAngry::Growl(WitchAngry *this,Witch *param_1)

{
  float fVar1;
  char cVar2;
  int *piVar3;
  WitchAngry *pWVar4;
  longdouble lVar5;
  char *local_28;
  float local_24;
  
  fVar1 = *(float *)(param_1 + 0x1d94);
  if (0.3 <= fVar1) {
    if (0.6 <= fVar1) {
      if ((0.6 < *(float *)(this + 0x4c) || *(float *)(this + 0x4c) == 0.6) ||
         (*(float *)(this + 0x48) == -1.0)) {
        local_28 = "WitchZombie.GrowlHigh";
      }
      else {
        (**(code **)(*(int *)(this + 0x40) + 4))(this + 0x40,this + 0x48);
        local_28 = "WitchZombie.GrowlHigh";
        *(undefined4 *)(this + 0x48) = 0xbf800000;
      }
    }
    else if ((0.3 < *(float *)(this + 0x4c) || *(float *)(this + 0x4c) == 0.3) ||
            (*(float *)(this + 0x48) == -1.0)) {
      local_28 = "WitchZombie.GrowlMedium";
    }
    else {
      (**(code **)(*(int *)(this + 0x40) + 4))(this + 0x40,this + 0x48);
      local_28 = "WitchZombie.GrowlMedium";
      *(undefined4 *)(this + 0x48) = 0xbf800000;
    }
  }
  else {
    local_28 = "WitchZombie.GrowlLow";
  }
  pWVar4 = this + 0x40;
  lVar5 = (longdouble)CountdownTimer::Now();
  if (*(float *)(this + 0x48) <= (float)lVar5) {
    CBaseEntity::EmitSound((CBaseEntity *)param_1,local_28,0.0,(float *)0x0);
    if (fVar1 < 0.6) {
      lVar5 = (longdouble)RandomFloat(0x3f400000,0x3fc00000);
      local_24 = (float)lVar5;
      lVar5 = (longdouble)CountdownTimer::Now();
      if ((float)lVar5 + local_24 != *(float *)(this + 0x48)) {
        (**(code **)(*(int *)(this + 0x40) + 4))(pWVar4,this + 0x48);
        *(float *)(this + 0x48) = (float)lVar5 + local_24;
      }
      if (local_24 == *(float *)(this + 0x44)) goto LAB_00a3baad;
    }
    else {
      lVar5 = (longdouble)RandomFloat(0x3fc00000,0x40000000);
      local_24 = (float)lVar5;
      lVar5 = (longdouble)CountdownTimer::Now();
      if ((float)lVar5 + local_24 != *(float *)(this + 0x48)) {
        (**(code **)(*(int *)(this + 0x40) + 4))(pWVar4,this + 0x48);
        *(float *)(this + 0x48) = (float)lVar5 + local_24;
      }
      if (local_24 == *(float *)(this + 0x44)) goto LAB_00a3baad;
    }
    (**(code **)(*(int *)(this + 0x40) + 4))(pWVar4,this + 0x44);
    *(float *)(this + 0x44) = local_24;
  }
LAB_00a3baad:
  piVar3 = (int *)(**(code **)(*(int *)param_1 + 0x594))(param_1);
  if (piVar3 != (int *)0x0) {
    if (0.54 < *(float *)(this + 0x4c) || *(float *)(this + 0x4c) == 0.54) {
      if ((fVar1 < 0.54) && (cVar2 = (**(code **)(*piVar3 + 0xe4))(piVar3,0x2aa), cVar2 == '\0')) {
        (**(code **)(*piVar3 + 0xd8))(piVar3,0x2aa,1);
      }
    }
    else if ((0.54 <= fVar1) && (cVar2 = (**(code **)(*piVar3 + 0xe4))(piVar3,0x2ab), cVar2 == '\0')
            ) {
      (**(code **)(*piVar3 + 0xd8))(piVar3,0x2ab,1);
    }
  }
  *(float *)(this + 0x4c) = fVar1;
  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)