Quick and dirty fix for broken 6dof/spiderpig cheats.

This commit is contained in:
Shpoike 2023-02-11 04:46:32 +00:00
parent a70c84a2bc
commit 73f9cddcdf
1 changed files with 9 additions and 0 deletions

View File

@ -1393,6 +1393,9 @@ void CL_ClampPitch (int pnum, float frametime)
VectorAngles(view[0], view[2], pv->viewangles, false); VectorAngles(view[0], view[2], pv->viewangles, false);
VectorClear(pv->viewanglechange); VectorClear(pv->viewanglechange);
//fixme: in_vraim stuff
VectorCopy(pv->viewangles, pv->aimangles);
return; return;
} }
#if 1 #if 1
@ -1450,8 +1453,11 @@ void CL_ClampPitch (int pnum, float frametime)
if (!vang[ROLL]) if (!vang[ROLL])
{ {
if (!pv->viewanglechange[PITCH] && !pv->viewanglechange[YAW] && !pv->viewanglechange[ROLL]) if (!pv->viewanglechange[PITCH] && !pv->viewanglechange[YAW] && !pv->viewanglechange[ROLL])
{
VectorCopy(pv->viewangles, pv->aimangles);
return; return;
} }
}
else else
{ {
if (fabs(vang[ROLL]) < frametime*180) if (fabs(vang[ROLL]) < frametime*180)
@ -1490,6 +1496,9 @@ void CL_ClampPitch (int pnum, float frametime)
pv->viewangles[ROLL] += 360; pv->viewangles[ROLL] += 360;
if (pv->viewangles[PITCH] < -180) if (pv->viewangles[PITCH] < -180)
pv->viewangles[PITCH] += 360; pv->viewangles[PITCH] += 360;
//fixme: in_vraim stuff
VectorCopy(pv->viewangles, pv->aimangles);
return; return;
} }
#endif #endif