L L4D2node

CBasePlayerAnimState::EstimateYaw

0x00421630 · 168 bytes · __thiscall

_ZN20CBasePlayerAnimState11EstimateYawEv

Decompiled

undefined (1 param)

/* CBasePlayerAnimState::EstimateYaw() */

void __thiscall CBasePlayerAnimState::EstimateYaw(CBasePlayerAnimState *this)

{
  longdouble lVar1;
  float local_18;
  float local_14;
  
  GetOuterAbsVelocity(this,(Vector *)&local_18);
  if (0.5 < SQRT(local_14 * local_14 + local_18 * local_18)) {
    lVar1 = (longdouble)__atan2_finite((double)local_14,(double)local_18);
    *(float *)(this + 0xa4) = (float)lVar1 * 57.295776;
    lVar1 = (longdouble)AngleNormalize((float)lVar1 * 57.295776);
    *(float *)(this + 0xa4) = (float)lVar1;
  }
  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)