L L4D2node

CTerrorMeleeWeapon::GetSwingYawForDirection

0x00569390 · 74 bytes · __thiscall

_ZN18CTerrorMeleeWeapon23GetSwingYawForDirectionE19MeleeSwingDirection

Decompiled

undefined (2 params)

/* CTerrorMeleeWeapon::GetSwingYawForDirection(MeleeSwingDirection) */

longdouble __thiscall CTerrorMeleeWeapon::GetSwingYawForDirection(undefined4 this,int param_2)

{
  uint uVar1;
  float fVar2;
  
  fVar2 = 0.0;
  if (param_2 - 2U < 6) {
    fVar2 = 45.0;
    uVar1 = 1 << ((byte)(param_2 - 2U) & 0x1f);
    if (((uVar1 & 0x32) == 0) && (fVar2 = 0.0, (uVar1 & 0xd) != 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)