L L4D2node

CGameMovement::Accelerate

0x00453520 · 165 bytes · __thiscall

_ZN13CGameMovement10AccelerateER6Vectorff

Decompiled

undefined (4 params)

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

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

{
  Vector *pVVar1;
  float *pfVar2;
  char cVar3;
  int iVar4;
  int iVar5;
  float fVar6;
  float fVar7;
  
  cVar3 = (**(code **)(*(int *)this + 100))(this);
  if (cVar3 != '\0') {
    iVar5 = *(int *)(this + 8);
    fVar7 = param_2 - (*(float *)param_1 * *(float *)(iVar5 + 0x40) +
                       *(float *)(param_1 + 4) * *(float *)(iVar5 + 0x44) +
                      *(float *)(param_1 + 8) * *(float *)(iVar5 + 0x48));
    if (0.0 < fVar7) {
      iVar4 = 0;
      fVar6 = *(float *)(*(int *)(this + 4) + 0x2180) * *(float *)(gpGlobals + 0x10) * param_3 *
              param_2;
      if (fVar7 <= fVar6) {
        fVar6 = fVar7;
      }
      while( true ) {
        pVVar1 = param_1 + iVar4;
        pfVar2 = (float *)(iVar5 + 0x40 + 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)