L L4D2node

InfectedAlert::OnResume

0x00a1a760 · 247 bytes · __thiscall

_ZN13InfectedAlert8OnResumeEP8InfectedP6ActionIS0_E

Decompiled

undefined (3 params)

/* InfectedAlert::OnResume(Infected*, Action<Infected>*) */

InfectedAlert * __thiscall
InfectedAlert::OnResume(InfectedAlert *this,Infected *param_1,Action *param_2)

{
  float fVar1;
  char cVar2;
  InfectedWander *this_00;
  longdouble lVar3;
  
  cVar2 = LookTowardsDisturbance((InfectedAlert *)param_1,(Infected *)param_2);
  if (cVar2 == '\0') {
    this_00 = ::operator_new(0x74);
                    /* try { // try from 00a1a79b to 00a1a79f has its CatchHandler @ 00a1a861 */
    InfectedWander::InfectedWander(this_00,(Action *)0x0);
    *(undefined4 *)this = 1;
    *(InfectedWander **)(this + 4) = this_00;
    *(undefined4 *)(this + 8) = 0;
    return this;
  }
  lVar3 = (longdouble)RandomFloat(0x41000000,0x41400000);
  fVar1 = (float)lVar3;
  lVar3 = (longdouble)CountdownTimer::Now();
  if ((float)lVar3 + fVar1 != *(float *)(param_1 + 0x4c)) {
    (**(code **)(*(int *)(param_1 + 0x44) + 4))(param_1 + 0x44,param_1 + 0x4c);
    *(float *)(param_1 + 0x4c) = (float)lVar3 + fVar1;
  }
  if (fVar1 != *(float *)(param_1 + 0x48)) {
    (**(code **)(*(int *)(param_1 + 0x44) + 4))(param_1 + 0x44,param_1 + 0x48);
    *(float *)(param_1 + 0x48) = fVar1;
  }
  *(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)