mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
2p splitscreen camera height fix
When 2p splitscreen is active, only use 75% of map-specific camera heights.
This commit is contained in:
parent
dce6a92ef3
commit
9db2da65a6
2 changed files with 18 additions and 2 deletions
|
|
@ -9650,9 +9650,16 @@ void P_DoQuakeOffset(UINT8 view, mappoint_t *viewPos, mappoint_t *offset)
|
||||||
|
|
||||||
fixed_t maxShake = FixedMul(cv_cam_height[view].value, mapobjectscale) * 3 / 4;
|
fixed_t maxShake = FixedMul(cv_cam_height[view].value, mapobjectscale) * 3 / 4;
|
||||||
|
|
||||||
|
// Map-specific camera height
|
||||||
if (mapheaderinfo[gamemap-1]->cameraHeight >= 0)
|
if (mapheaderinfo[gamemap-1]->cameraHeight >= 0)
|
||||||
{
|
{
|
||||||
maxShake = FixedMul(mapheaderinfo[gamemap-1]->cameraHeight, mapobjectscale) * 3 / 4;
|
if (r_splitscreen != 1)
|
||||||
|
maxShake = FixedMul(mapheaderinfo[gamemap-1]->cameraHeight, mapobjectscale) * 3 / 4;
|
||||||
|
|
||||||
|
// For 2p SPLITSCREEN SPECIFICALLY:
|
||||||
|
// The view is pretty narrow, so move it back 1/4th of the way towards default camera height.
|
||||||
|
else
|
||||||
|
maxShake = FixedMul((mapheaderinfo[gamemap-1]->cameraHeight*3 + cv_cam_height[view].value)/4, mapobjectscale) * 3 / 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (battle)
|
if (battle)
|
||||||
|
|
|
||||||
11
src/p_user.c
11
src/p_user.c
|
|
@ -3376,9 +3376,18 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
||||||
camdist = FixedMul(cv_cam_dist[num].value, cameraScale);
|
camdist = FixedMul(cv_cam_dist[num].value, cameraScale);
|
||||||
camheight = FixedMul(cv_cam_height[num].value, cameraScale);
|
camheight = FixedMul(cv_cam_height[num].value, cameraScale);
|
||||||
|
|
||||||
|
// Map-specific camera height
|
||||||
if (mapheaderinfo[gamemap-1]->cameraHeight >= 0)
|
if (mapheaderinfo[gamemap-1]->cameraHeight >= 0)
|
||||||
{
|
{
|
||||||
camheight = FixedMul(mapheaderinfo[gamemap-1]->cameraHeight, cameraScale);
|
if (r_splitscreen != 1)
|
||||||
|
camheight = FixedMul(mapheaderinfo[gamemap-1]->cameraHeight, cameraScale);
|
||||||
|
|
||||||
|
// For 2p SPLITSCREEN SPECIFICALLY:
|
||||||
|
// The view is pretty narrow, so move it back 1/4th of the way towards default camera height.
|
||||||
|
else {
|
||||||
|
// CONS_Printf( "Camera values: %f / %f / %f \n", FixedToFloat(mapheaderinfo[gamemap-1]->cameraHeight), FixedToFloat(cv_cam_height[num].value), FixedToFloat(cameraScale) );
|
||||||
|
camheight = FixedMul((mapheaderinfo[gamemap-1]->cameraHeight*3 + cv_cam_height[num].value)/4, cameraScale);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (loop_in < loop->zoom_in_speed)
|
if (loop_in < loop->zoom_in_speed)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue