L L4D2node

CMultiPlayerAnimState::HandleDucking

0x0046d230 · 79 bytes · __thiscall

_ZN21CMultiPlayerAnimState13HandleDuckingER8Activity

Decompiled

undefined (2 params)

/* CMultiPlayerAnimState::HandleDucking(Activity&) */

undefined4 __thiscall
CMultiPlayerAnimState::HandleDucking(CMultiPlayerAnimState *this,Activity *param_1)

{
  longdouble lVar1;
  
  if ((*(byte *)(*(int *)(this + 0x1c) + 0x150) & 2) == 0) {
    return 0;
  }
  lVar1 = (longdouble)GetOuterXYSpeed(this);
  if ((float)lVar1 <= 0.5) {
    *(undefined4 *)param_1 = 0x61f;
    return 1;
  }
  *(undefined4 *)param_1 = 0x626;
  return 1;
}

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)