L L4D2node

CFish::Panic

0x006a5130 · 341 bytes · __thiscall

_ZN5CFish5PanicEv

Decompiled

undefined (1 param)

/* CFish::Panic() */

void __thiscall CFish::Panic(CFish *this)

{
  float fVar1;
  longdouble lVar2;
  
  lVar2 = (longdouble)RandomFloat(0x40a00000,0x41700000);
  fVar1 = (float)lVar2;
  lVar2 = (longdouble)CountdownTimer::Now();
  if ((float)lVar2 + fVar1 != *(float *)(this + 0x147c)) {
    (**(code **)(*(int *)(this + 0x1474) + 4))(this + 0x1474,this + 0x147c);
    *(float *)(this + 0x147c) = (float)lVar2 + fVar1;
  }
  if (fVar1 != *(float *)(this + 0x1478)) {
    (**(code **)(*(int *)(this + 0x1474) + 4))(this + 0x1474,this + 0x1478);
    *(float *)(this + 0x1478) = fVar1;
  }
  lVar2 = (longdouble)RandomFloat(0x41200000,0x41a00000);
  fVar1 = (float)lVar2;
  lVar2 = (longdouble)CountdownTimer::Now();
  if ((float)lVar2 + fVar1 != *(float *)(this + 0x1470)) {
    (**(code **)(*(int *)(this + 0x1468) + 4))(this + 0x1468,this + 0x1470);
    *(float *)(this + 0x1470) = (float)lVar2 + fVar1;
  }
  if (fVar1 != *(float *)(this + 0x146c)) {
    (**(code **)(*(int *)(this + 0x1468) + 4))(this + 0x1468,this + 0x146c);
    *(float *)(this + 0x146c) = fVar1;
  }
  *(undefined4 *)(this + 0x143c) = *(undefined4 *)(this + 0x1444);
  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)