L L4D2node

CBasePlayer::GetSmoothedVelocity

0x007a8560 · 114 bytes · __cdecl

_ZN11CBasePlayer19GetSmoothedVelocityEv

Decompiled

undefined (0 params)

/* CBasePlayer::GetSmoothedVelocity() */

int * CBasePlayer::GetSmoothedVelocity(void)

{
  char cVar1;
  int *piVar2;
  int *in_stack_00000004;
  int *in_stack_00000008;
  
  cVar1 = (**(code **)(*in_stack_00000008 + 0x4fc))();
  if (cVar1 == '\0') {
    *in_stack_00000004 = in_stack_00000008[0x77b];
    in_stack_00000004[1] = in_stack_00000008[0x77c];
    in_stack_00000004[2] = in_stack_00000008[0x77d];
    return in_stack_00000004;
  }
  piVar2 = (int *)(**(code **)(*in_stack_00000008 + 0x500))();
  piVar2 = (int *)(**(code **)(*piVar2 + 0x20))(piVar2);
  (**(code **)(*piVar2 + 600))();
  return in_stack_00000004;
}

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)