L L4D2node

CGameMovement::AirMove

0x00452530 · 376 bytes · __thiscall

_ZN13CGameMovement7AirMoveEv

Decompiled

undefined (1 param)

/* CGameMovement::AirMove() */

void __thiscall CGameMovement::AirMove(CGameMovement *this)

{
  float fVar1;
  int iVar2;
  int iVar3;
  longdouble lVar4;
  float fVar5;
  float local_4c;
  float local_48;
  undefined4 local_44;
  float local_40;
  float local_3c;
  undefined4 local_38;
  float local_34;
  float local_30;
  undefined4 local_2c;
  Vector local_28 [24];
  
  AngleVectors((QAngle *)(*(int *)(this + 8) + 0xc),(Vector *)&local_40,(Vector *)&local_34,local_28
              );
  local_38 = 0;
  local_2c = 0;
  fVar5 = *(float *)(*(int *)(this + 8) + 0x2c);
  fVar1 = *(float *)(*(int *)(this + 8) + 0x30);
  VectorNormalize((Vector *)&local_40);
  VectorNormalize((Vector *)&local_34);
  local_44 = 0;
  local_48 = local_30 * fVar1 + local_3c * fVar5;
  local_4c = fVar1 * local_34 + fVar5 * local_40;
  lVar4 = (longdouble)VectorNormalize((Vector *)&local_4c);
  fVar5 = (float)lVar4;
  if ((fVar5 != 0.0) && (*(float *)(*(int *)(this + 8) + 0x38) <= fVar5)) {
    fVar5 = *(float *)(*(int *)(this + 8) + 0x38);
  }
  (**(code **)(*(int *)this + 0x5c))
            (this,(Vector *)&local_4c,fVar5,*(undefined4 *)(sv_airaccelerate._28_4_ + 0x2c));
  iVar2 = *(int *)(this + 8);
  iVar3 = *(int *)(this + 4);
  *(float *)(iVar2 + 0x40) = *(float *)(iVar2 + 0x40) + *(float *)(iVar3 + 0x268);
  *(float *)(iVar2 + 0x44) = *(float *)(iVar2 + 0x44) + *(float *)(iVar3 + 0x26c);
  *(float *)(iVar2 + 0x48) = *(float *)(iVar2 + 0x48) + *(float *)(iVar3 + 0x270);
  (**(code **)(*(int *)this + 0xa0))(this);
  iVar2 = *(int *)(this + 8);
  iVar3 = *(int *)(this + 4);
  *(float *)(iVar2 + 0x40) = *(float *)(iVar2 + 0x40) - *(float *)(iVar3 + 0x268);
  *(float *)(iVar2 + 0x44) = *(float *)(iVar2 + 0x44) - *(float *)(iVar3 + 0x26c);
  *(float *)(iVar2 + 0x48) = *(float *)(iVar2 + 0x48) - *(float *)(iVar3 + 0x270);
  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)