L L4D2node

CGameMovement::AirAccelerate

0x00451aa0 · 202 bytes · __thiscall

_ZN13CGameMovement13AirAccelerateER6Vectorff

Decompiled

undefined (4 params)

/* CGameMovement::AirAccelerate(Vector&, float, float) */

void __thiscall
CGameMovement::AirAccelerate(CGameMovement *this,Vector *param_1,float param_2,float param_3)

{
  Vector *pVVar1;
  float *pfVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  float fVar6;
  float fVar7;
  
  iVar3 = *(int *)(this + 4);
  if ((*(char *)(iVar3 + 0x1c80) == '\0') && (*(float *)(iVar3 + 0x2010) == 0.0)) {
    iVar5 = *(int *)(this + 8);
    fVar7 = 30.0;
    if (param_2 <= 30.0) {
      fVar7 = param_2;
    }
    fVar7 = fVar7 - (*(float *)param_1 * *(float *)(iVar5 + 0x40) +
                     *(float *)(param_1 + 8) * *(float *)(iVar5 + 0x48) +
                    *(float *)(param_1 + 4) * *(float *)(iVar5 + 0x44));
    if (0.0 < fVar7) {
      iVar4 = 0;
      fVar6 = *(float *)(iVar3 + 0x2180) * *(float *)(gpGlobals + 0x10) * param_3 * param_2;
      if (fVar7 <= fVar6) {
        fVar6 = fVar7;
      }
      while( true ) {
        pfVar2 = (float *)(iVar5 + 0x40 + iVar4);
        *pfVar2 = *(float *)(param_1 + iVar4) * fVar6 + *pfVar2;
        pVVar1 = param_1 + iVar4;
        pfVar2 = (float *)(*(int *)(this + 8) + 0x68 + iVar4);
        iVar4 = iVar4 + 4;
        *pfVar2 = *(float *)pVVar1 * fVar6 + *pfVar2;
        if (iVar4 == 0xc) break;
        iVar5 = *(int *)(this + 8);
      }
    }
  }
  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)