L L4D2node

CTerrorMeleeWeapon::GetSwingPitchForDirection

0x005693f0 · 71 bytes · __thiscall

_ZN18CTerrorMeleeWeapon25GetSwingPitchForDirectionE19MeleeSwingDirection

Decompiled

undefined (2 params)

/* CTerrorMeleeWeapon::GetSwingPitchForDirection(MeleeSwingDirection) */

longdouble __thiscall CTerrorMeleeWeapon::GetSwingPitchForDirection(undefined4 this,uint param_2)

{
  uint uVar1;
  float fVar2;
  
  fVar2 = 0.0;
  if (param_2 < 8) {
    fVar2 = -45.0;
    uVar1 = 1 << ((byte)param_2 & 0x1f);
    if (((uVar1 & 0x91) == 0) && (fVar2 = 0.0, (uVar1 & 0x62) != 0)) {
      return (longdouble)45.0;
    }
  }
  return (longdouble)fVar2;
}

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)