L L4D2node

CGameMovement::CalcRoll

0x00452470 · 178 bytes · __thiscall

_ZN13CGameMovement8CalcRollERK6QAngleRK6Vectorff

Decompiled

undefined (5 params)

/* CGameMovement::CalcRoll(QAngle const&, Vector const&, float, float) */

longdouble __thiscall
CGameMovement::CalcRoll
          (CGameMovement *this,QAngle *param_1,Vector *param_2,float param_3,float param_4)

{
  uint uVar1;
  float fVar2;
  Vector local_30 [12];
  float local_24;
  float local_20;
  float local_1c;
  Vector local_18 [16];
  
  AngleVectors(param_1,local_30,(Vector *)&local_24,local_18);
  fVar2 = local_20 * *(float *)(param_2 + 4) + local_24 * *(float *)param_2 +
          local_1c * *(float *)(param_2 + 8);
  uVar1 = -(uint)(fVar2 < 0.0);
  fVar2 = ABS(fVar2);
  if (fVar2 < param_4) {
    param_3 = (param_3 * fVar2) / param_4;
  }
  return (longdouble)(param_3 * (float)(~uVar1 & 0x3f800000 | uVar1 & 0xbf800000));
}

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)