L L4D2node

InfectedBurn::OnStart

0x00a30c30 · 254 bytes · __cdecl

_ZN12InfectedBurn7OnStartEP8InfectedP6ActionIS0_E

Decompiled

undefined (2 params)

/* InfectedBurn::OnStart(Infected*, Action<Infected>*) */

Infected * InfectedBurn::OnStart(Infected *param_1,Action *param_2)

{
  float fVar1;
  longdouble lVar2;
  
  lVar2 = (longdouble)RandomFloat(0xc2200000,0x42200000);
  *(float *)(param_2 + 0x34) = (float)lVar2;
  lVar2 = (longdouble)RandomFloat(0x40a00000,0x41000000);
  fVar1 = (float)lVar2;
  lVar2 = (longdouble)CountdownTimer::Now();
  if ((float)lVar2 + fVar1 != *(float *)(param_2 + 0x4c)) {
    (**(code **)(*(int *)(param_2 + 0x44) + 4))(param_2 + 0x44,param_2 + 0x4c);
    *(float *)(param_2 + 0x4c) = (float)lVar2 + fVar1;
  }
  if (fVar1 != *(float *)(param_2 + 0x48)) {
    (**(code **)(*(int *)(param_2 + 0x44) + 4))(param_2 + 0x44,param_2 + 0x48);
    *(float *)(param_2 + 0x48) = fVar1;
  }
  if (*(float *)(param_2 + 0x58) != -1.0) {
    (**(code **)(*(int *)(param_2 + 0x50) + 4))(param_2 + 0x50,param_2 + 0x58);
    *(undefined4 *)(param_2 + 0x58) = 0xbf800000;
  }
  *(undefined4 *)param_1 = 0;
  *(undefined4 *)(param_1 + 4) = 0;
  *(undefined4 *)(param_1 + 8) = 0;
  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)