L L4D2node

WitchWander::OnMoveToFailure

0x00a463f0 · 309 bytes · __cdecl

_ZN11WitchWander15OnMoveToFailureEP8InfectedPK4Path17MoveToFailureType

Decompiled

undefined (3 params)

/* WitchWander::OnMoveToFailure(Infected*, Path const*, MoveToFailureType) */

undefined4 *
WitchWander::OnMoveToFailure(undefined4 *param_1,WitchWander *param_2,Infected *param_3)

{
  float fVar1;
  char cVar2;
  int *piVar3;
  int *piVar4;
  longdouble lVar5;
  
  cVar2 = BuildWanderPath(param_2,param_3);
  if (cVar2 == '\0') {
    piVar3 = (int *)(**(code **)(*(int *)param_3 + 0x594))(param_3);
    PathFollower::Invalidate((PathFollower *)(param_2 + 0x40));
    piVar4 = (int *)(**(code **)(*(int *)param_3 + 0x590))(param_3);
    (**(code **)(*piVar4 + 0xe0))(piVar4);
    (**(code **)(*piVar3 + 0xd8))(piVar3,0x2b2,0);
    lVar5 = (longdouble)RandomFloat(0x40400000,0x40c00000);
    fVar1 = (float)lVar5;
    lVar5 = (longdouble)CountdownTimer::Now();
    if ((float)lVar5 + fVar1 != *(float *)(param_2 + 0x483c)) {
      (**(code **)(*(int *)(param_2 + 0x4834) + 4))(param_2 + 0x4834,param_2 + 0x483c);
      *(float *)(param_2 + 0x483c) = (float)lVar5 + fVar1;
    }
    if (fVar1 != *(float *)(param_2 + 0x4838)) {
      (**(code **)(*(int *)(param_2 + 0x4834) + 4))(param_2 + 0x4834,param_2 + 0x4838);
      *(float *)(param_2 + 0x4838) = fVar1;
    }
  }
  *param_1 = 0;
  param_1[1] = 0;
  param_1[2] = 0;
  param_1[3] = 1;
  return param_1;
}

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)