L L4D2node

CBaseServerVehicle::GetVehicleViewPosition

0x00b367c0 · 189 bytes · __thiscall

_ZN18CBaseServerVehicle22GetVehicleViewPositionEiP6VectorP6QAnglePf

Decompiled

undefined (5 params)

/* CBaseServerVehicle::GetVehicleViewPosition(int, Vector*, QAngle*, float*) */

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

{
  code *pcVar1;
  char cVar2;
  CBaseServerVehicle *pCVar3;
  undefined4 *puVar4;
  int iVar5;
  CBaseServerVehicle **ppCVar6;
  undefined4 local_40;
  CBaseServerVehicle *local_3c;
  CBaseServerVehicle *local_38;
  undefined4 local_28;
  undefined4 local_24;
  undefined4 local_20;
  
  ppCVar6 = &local_3c;
  local_38 = (CBaseServerVehicle *)0x0;
  local_3c = this;
  local_40 = 0xb367e1;
  pCVar3 = (CBaseServerVehicle *)(*(code *)**(undefined4 **)this)();
  if (pCVar3 != (CBaseServerVehicle *)0x0) {
    local_40 = 0xb367f6;
    local_3c = pCVar3;
    cVar2 = (**(code **)(*(int *)pCVar3 + 0x16c))();
    if (cVar2 != '\0') {
      if (param_2 != (Vector *)0x0) {
        local_3c = (CBaseServerVehicle *)&local_28;
        local_40 = 0xb36810;
        local_38 = pCVar3;
        (**(code **)(*(int *)pCVar3 + 0x234))();
        ppCVar6 = (CBaseServerVehicle **)&local_40;
        *(undefined4 *)param_2 = local_28;
        *(undefined4 *)(param_2 + 4) = local_24;
        *(undefined4 *)(param_2 + 8) = local_20;
      }
      if (param_3 != (QAngle *)0x0) {
        iVar5 = *(int *)pCVar3;
        *ppCVar6 = pCVar3;
        pcVar1 = *(code **)(iVar5 + 0x238);
        ppCVar6[-1] = (CBaseServerVehicle *)0xb3683f;
        puVar4 = (undefined4 *)(*pcVar1)();
        *(undefined4 *)param_3 = *puVar4;
        *(undefined4 *)(param_3 + 4) = puVar4[1];
        *(undefined4 *)(param_3 + 8) = puVar4[2];
      }
      if (param_4 != (float *)0x0) {
        *ppCVar6 = pCVar3;
        ppCVar6[-1] = (CBaseServerVehicle *)0xb3686a;
        iVar5 = CBasePlayer::GetFOV((CBasePlayer *)*ppCVar6);
        *param_4 = (float)iVar5;
      }
    }
  }
  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)