L L4D2node

CGameMovement::HandleDuckingSpeedCrop

0x004536b0 · 117 bytes · __thiscall

_ZN13CGameMovement22HandleDuckingSpeedCropEv

Decompiled

undefined (1 param)

/* CGameMovement::HandleDuckingSpeedCrop() */

void __thiscall CGameMovement::HandleDuckingSpeedCrop(CGameMovement *this)

{
  int iVar1;
  
  if ((this[0x63c] == (CGameMovement)0x0) && (((byte)(*(CBaseEntity **)(this + 4))[0x150] & 2) != 0)
     ) {
    iVar1 = CBaseEntity::GetGroundEntity(*(CBaseEntity **)(this + 4));
    if (iVar1 != 0) {
      *(float *)(*(int *)(this + 8) + 0x2c) = *(float *)(*(int *)(this + 8) + 0x2c) * 0.33333334;
      *(float *)(*(int *)(this + 8) + 0x30) = *(float *)(*(int *)(this + 8) + 0x30) * 0.33333334;
      *(float *)(*(int *)(this + 8) + 0x34) = *(float *)(*(int *)(this + 8) + 0x34) * 0.33333334;
      this[0x63c] = (CGameMovement)0x1;
      return;
    }
  }
  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)