L L4D2node

InfectedWander::BecomeAlert

0x00a39140 · 354 bytes · __thiscall

_ZN14InfectedWander11BecomeAlertEP8InfectedRK6Vector.part.70

Decompiled

undefined (3 params)

/* InfectedWander::BecomeAlert(Infected*, Vector const&) [clone .part.70] */

void __thiscall InfectedWander::BecomeAlert(InfectedWander *this,Infected *param_1,Vector *param_2)

{
  char cVar1;
  int in_EAX;
  int *piVar2;
  undefined4 *in_ECX;
  int *in_EDX;
  longdouble lVar3;
  float fVar4;
  
  piVar2 = (int *)(**(code **)(*in_EDX + 0x594))();
  cVar1 = (**(code **)(*piVar2 + 0x100))(piVar2,4);
  fVar4 = 3.0;
  if (cVar1 == '\0') {
    piVar2 = (int *)(**(code **)(*in_EDX + 0x594))();
    cVar1 = (**(code **)(*piVar2 + 0x100))(piVar2,0);
    fVar4 = 2.0;
    if (cVar1 != '\0') {
      cVar1 = IsTimeOfDayBetween(2,4);
      fVar4 = 0.5;
      if (cVar1 == '\0') {
        fVar4 = 1.0;
      }
    }
  }
  lVar3 = (longdouble)RandomFloat(0x3e99999a,0x3f800000);
  fVar4 = (float)lVar3 * fVar4;
  lVar3 = (longdouble)CountdownTimer::Now();
  if ((float)lVar3 + fVar4 != *(float *)(in_EAX + 0x4c)) {
    (**(code **)(*(int *)(in_EAX + 0x44) + 4))(in_EAX + 0x44,in_EAX + 0x4c);
    *(float *)(in_EAX + 0x4c) = (float)lVar3 + fVar4;
  }
  if (fVar4 != *(float *)(in_EAX + 0x48)) {
    (**(code **)(*(int *)(in_EAX + 0x44) + 4))(in_EAX + 0x44,in_EAX + 0x48);
    *(float *)(in_EAX + 0x48) = fVar4;
  }
  *(undefined4 *)(in_EAX + 0x50) = *in_ECX;
  *(undefined4 *)(in_EAX + 0x54) = in_ECX[1];
  *(undefined4 *)(in_EAX + 0x58) = in_ECX[2];
  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)