Merge branch 'fix-downward-camera' into 'master'

Fix slope camera in Software mode

Closes #626

See merge request KartKrew/Kart!1714
This commit is contained in:
toaster 2023-12-28 14:56:40 +00:00
commit 57724baf9f
2 changed files with 18 additions and 2 deletions

View file

@ -761,7 +761,7 @@ INT16 G_SoftwareClipAimingPitch(INT32 *aiming)
INT32 limitangle;
// note: the current software mode implementation doesn't have true perspective
limitangle = ANGLE_45; // Some viewing fun, but not too far down...
limitangle = ANGLE_90 - ANG10; // Some viewing fun, but not too far down...
if (*aiming > limitangle)
*aiming = limitangle;

View file

@ -3002,7 +3002,23 @@ void P_DemoCameraMovement(camera_t *cam, UINT8 num)
}
}
G_FinalClipAimingPitch((INT32 *)&cam->aiming, NULL, false);
if (rendermode == render_soft
#ifdef HWRENDER
|| (rendermode == render_opengl && (cv_glshearing.value == 1))
#endif
)
{
// Extra restriction on this so it's not possible to
// distort the view too much.
if ((INT32)cam->aiming > ANGLE_45)
cam->aiming = ANGLE_45;
else if ((INT32)cam->aiming < -ANGLE_45)
cam->aiming = -ANGLE_45;
}
else
{
G_ClipAimingPitch((INT32 *)&cam->aiming);
}
cam->momx = cam->momy = cam->momz = 0;