L L4D2node

BoomerVomitOnVictim::OnStart

0x00a758e0 · 650 bytes · __thiscall

_ZN19BoomerVomitOnVictim7OnStartEP6BoomerP6ActionIS0_E

Decompiled

undefined (3 params)

/* BoomerVomitOnVictim::OnStart(Boomer*, Action<Boomer>*) */

BoomerVomitOnVictim * __thiscall
BoomerVomitOnVictim::OnStart(BoomerVomitOnVictim *this,Boomer *param_1,Action *param_2)

{
  int iVar1;
  int *piVar2;
  longdouble lVar3;
  float fVar4;
  
  iVar1 = GetDifficulty();
  if (iVar1 == 1) {
    fVar4 = *(float *)(BoomerVomitDelay._28_4_ + 0x2c);
    lVar3 = (longdouble)CountdownTimer::Now();
    if ((float)lVar3 + fVar4 != *(float *)(param_1 + 0x40)) {
      (**(code **)(*(int *)(param_1 + 0x38) + 4))(param_1 + 0x38,param_1 + 0x40);
      *(float *)(param_1 + 0x40) = (float)lVar3 + fVar4;
    }
    if (fVar4 != *(float *)(param_1 + 0x3c)) {
      (**(code **)(*(int *)(param_1 + 0x38) + 4))(param_1 + 0x38,param_1 + 0x3c);
      *(float *)(param_1 + 0x3c) = fVar4;
    }
    goto LAB_00a75960;
  }
  if (iVar1 < 2) {
    if (iVar1 != 0) goto LAB_00a75960;
    fVar4 = *(float *)(BoomerVomitDelay._28_4_ + 0x2c) + *(float *)(BoomerVomitDelay._28_4_ + 0x2c);
    lVar3 = (longdouble)CountdownTimer::Now();
    if ((float)lVar3 + fVar4 != *(float *)(param_1 + 0x40)) {
      (**(code **)(*(int *)(param_1 + 0x38) + 4))(param_1 + 0x38,param_1 + 0x40);
      *(float *)(param_1 + 0x40) = (float)lVar3 + fVar4;
    }
  }
  else {
    if (iVar1 == 2) {
      lVar3 = (longdouble)CountdownTimer::Now();
      if ((float)lVar3 + 0.2 != *(float *)(param_1 + 0x40)) {
        (**(code **)(*(int *)(param_1 + 0x38) + 4))(param_1 + 0x38,param_1 + 0x40);
        *(float *)(param_1 + 0x40) = (float)lVar3 + 0.2;
      }
      if (*(float *)(param_1 + 0x3c) != 0.2) {
        (**(code **)(*(int *)(param_1 + 0x38) + 4))(param_1 + 0x38,param_1 + 0x3c);
        *(undefined4 *)(param_1 + 0x3c) = 0x3e4ccccd;
      }
      goto LAB_00a75960;
    }
    if (iVar1 != 3) goto LAB_00a75960;
    lVar3 = (longdouble)CountdownTimer::Now();
    if ((float)lVar3 != *(float *)(param_1 + 0x40)) {
      (**(code **)(*(int *)(param_1 + 0x38) + 4))(param_1 + 0x38,param_1 + 0x40);
      *(float *)(param_1 + 0x40) = (float)lVar3;
    }
    fVar4 = 0.0;
  }
  if (fVar4 != *(float *)(param_1 + 0x3c)) {
    (**(code **)(*(int *)(param_1 + 0x38) + 4))(param_1 + 0x38,param_1 + 0x3c);
    *(float *)(param_1 + 0x3c) = fVar4;
  }
LAB_00a75960:
  param_1[0x44] = (Boomer)0x0;
  CTerrorPlayer::Vocalize((CTerrorPlayer *)param_2,"BoomerZombie.Warn",0.0,0.0);
  piVar2 = (int *)(**(code **)(*(int *)param_2 + 0x9b0))(param_2);
  (**(code **)(*piVar2 + 0xe0))(piVar2);
  *(undefined4 *)this = 0;
  *(undefined4 *)(this + 4) = 0;
  *(undefined4 *)(this + 8) = 0;
  return this;
}

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)