L L4D2node

CFourWheelVehiclePhysics::GetVehicleViewPosition

0x006ae730 · 436 bytes · __thiscall

_ZN24CFourWheelVehiclePhysics22GetVehicleViewPositionEPKcfP6VectorP6QAngle

Decompiled

undefined (5 params)

/* CFourWheelVehiclePhysics::GetVehicleViewPosition(char const*, float, Vector*, QAngle*) */

void __thiscall
CFourWheelVehiclePhysics::GetVehicleViewPosition
          (CFourWheelVehiclePhysics *this,char *param_1,float param_2,Vector *param_3,
          QAngle *param_4)

{
  uint uVar1;
  undefined *puVar2;
  CBaseAnimating *this_00;
  longdouble lVar3;
  Vector local_124 [12];
  float local_118 [2];
  float local_110;
  matrix3x4_t local_10c [48];
  matrix3x4_t local_dc [48];
  matrix3x4_t local_ac [48];
  matrix3x4_t local_7c [48];
  matrix3x4_t local_4c [60];
  
  uVar1 = *(uint *)(this + 4);
  if (((uVar1 == 0xffffffff) ||
      (puVar2 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar2 == (undefined *)0xfffffffc)) ||
     (*(uint *)(puVar2 + 8) != uVar1 >> 0xc)) {
    this_00 = (CBaseAnimating *)0x0;
  }
  else {
    this_00 = *(CBaseAnimating **)(puVar2 + 4);
  }
  CBaseAnimating::GetAttachment(this_00,param_1,local_124,(QAngle *)local_118);
  AngleMatrix((QAngle *)local_118,local_10c);
  AngleMatrix(param_4,local_dc);
  MatrixInvert(local_10c,local_ac);
  ConcatTransforms(local_ac,local_dc,local_7c);
  lVar3 = (longdouble)RemapAngleRange(param_2 * 10.0,45.0,local_118[0]);
  local_118[0] = (float)lVar3;
  lVar3 = (longdouble)RemapAngleRange(param_2 * 5.0,45.0,local_110);
  local_110 = (float)lVar3;
  AngleMatrix((QAngle *)local_118,local_124,local_10c);
  ConcatTransforms(local_10c,local_7c,local_4c);
  MatrixAngles(local_4c,(float *)param_4);
  MatrixGetColumn(local_4c,3,param_3);
  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)