L L4D2node

InfectedBlinded::OnBlinded

0x00a31590 · 224 bytes · __cdecl

_ZN15InfectedBlinded9OnBlindedEP8InfectedP11CBaseEntity

Decompiled

undefined (2 params)

/* InfectedBlinded::OnBlinded(Infected*, CBaseEntity*) */

Infected * InfectedBlinded::OnBlinded(Infected *param_1,CBaseEntity *param_2)

{
  float fVar1;
  float fVar2;
  longdouble lVar3;
  
  lVar3 = (longdouble)RandomFloat(0x41000000,0x41400000);
  fVar2 = (float)lVar3;
  fVar1 = *(float *)(param_2 + 0x54);
  lVar3 = (longdouble)CountdownTimer::Now();
  if (fVar1 - (float)lVar3 < fVar2) {
    lVar3 = (longdouble)CountdownTimer::Now();
    if ((float)lVar3 + fVar2 != *(float *)(param_2 + 0x54)) {
      (**(code **)(*(int *)(param_2 + 0x4c) + 4))(param_2 + 0x4c,param_2 + 0x54);
      *(float *)(param_2 + 0x54) = (float)lVar3 + fVar2;
    }
    if (fVar2 != *(float *)(param_2 + 0x50)) {
      (**(code **)(*(int *)(param_2 + 0x4c) + 4))(param_2 + 0x4c,param_2 + 0x50);
      *(float *)(param_2 + 0x50) = fVar2;
    }
  }
  *(undefined4 *)param_1 = 4;
  *(undefined4 *)(param_1 + 4) = 0;
  *(undefined4 *)(param_1 + 8) = 0;
  *(undefined4 *)(param_1 + 0xc) = 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)