CBasePlayer::CalcVehicleView
0x00419560 · 302 bytes · __cdecl
_ZN11CBasePlayer15CalcVehicleViewEP14IServerVehicleR6VectorR6QAngleRfS6_S6_
Decompiled
undefined (6 params)
/* CBasePlayer::CalcVehicleView(IServerVehicle*, Vector&, QAngle&, float&, float&, float&) */
void CBasePlayer::CalcVehicleView
(IServerVehicle *param_1,Vector *param_2,QAngle *param_3,float *param_4,
float *param_5,float *param_6)
{
char cVar1;
CBasePlayer *in_stack_ffffffd4;
if (*(int *)(param_1 + 0x2104) != *(int *)(gpGlobals + 4)) {
CacheVehicleView(in_stack_ffffffd4);
}
*(undefined4 *)param_3 = *(undefined4 *)(param_1 + 0x20e8);
*(undefined4 *)(param_3 + 4) = *(undefined4 *)(param_1 + 0x20ec);
*(undefined4 *)(param_3 + 8) = *(undefined4 *)(param_1 + 0x20f0);
*param_4 = *(float *)(param_1 + 0x20f4);
param_4[1] = *(float *)(param_1 + 0x20f8);
param_4[2] = *(float *)(param_1 + 0x20fc);
cVar1 = IsHeadTrackingEnabled();
if (cVar1 != '\0') {
*param_4 = *param_4 + *(float *)(param_1 + 0x13c);
param_4[1] = param_4[1] + *(float *)(param_1 + 0x140);
param_4[2] = param_4[2] + *(float *)(param_1 + 0x144);
*(float *)param_3 = *(float *)param_3 + *(float *)(param_1 + 0x130);
*(float *)(param_3 + 4) = *(float *)(param_3 + 4) + *(float *)(param_1 + 0x134);
*(float *)(param_3 + 8) = *(float *)(param_3 + 8) + *(float *)(param_1 + 0x138);
}
CalcViewRoll((CBasePlayer *)param_1,(QAngle *)param_4);
*param_4 = *param_4 + *(float *)(param_1 + 0x1ab0);
param_4[1] = param_4[1] + *(float *)(param_1 + 0x1ab4);
param_4[2] = param_4[2] + *(float *)(param_1 + 0x1ab8);
return;
}
SourceMod gamedata
paste intoaddons/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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.