L L4D2node

CClaw::OnSwingEnd

0x00534d60 · 117 bytes · __thiscall

_ZN5CClaw10OnSwingEndEb

Decompiled

undefined (2 params)

/* CClaw::OnSwingEnd(bool) */

void __thiscall CClaw::OnSwingEnd(CClaw *this,bool param_1)

{
  float fVar1;
  float fVar2;
  float fVar3;
  int iVar4;
  longdouble lVar5;
  
  if (param_1) {
    return;
  }
  fVar1 = *(float *)(ClawSwingInterval._28_4_ + 0x2c);
  fVar2 = *(float *)(ClawSwingMissInterval._28_4_ + 0x2c);
  iVar4 = CTerrorWeapon::GetAttackTimer((CTerrorWeapon *)this);
  fVar3 = *(float *)(iVar4 + 8);
  lVar5 = (longdouble)CountdownTimer::Now();
  CTerrorWeapon::StartAttackTimer((CTerrorWeapon *)this,(fVar3 - (float)lVar5) - (fVar1 - fVar2));
  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)