fix the cam loops

This commit is contained in:
Alug committed 2024-10-13 21:47:56 +02:00
1 parent ba818244df
commit e21182ccfc
2 files changed
+20 -35

No files matched your search

+13 -21
View File
@@ -3338,19 +3338,17 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
if (!thiscam->chase && !resetcalled)
{
focusangle = mo->angle;
for (i = 0; i <= splitscreen; i++)
{
if (player == &players[displayplayers[i]])
if (player == (i == 0 ? &players[consoleplayer] : &players[displayplayers[i]]))
{
focusangle = localangle[i];
break;
}
else
{
focusangle = mo->angle;
}
}
camrotate = 0;
for (i = 0; i <= splitscreen; i++)
{
if (thiscam == &camera[i])
@@ -3358,10 +3356,6 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
camrotate = cv_cam_rotate[i].value;
break;
}
else
{
camrotate = 0;
}
}
if (leveltime < introtime) // Whoooshy camera!
@@ -3390,19 +3384,17 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
}
else
{
for (i = 0; i <= splitscreen; i++)
focusangle = mo->angle;
focusaiming = player->aiming;
}
for (i = 0; i <= splitscreen; i++)
{
if (player == (i == 0 ? &players[consoleplayer] : &players[displayplayers[i]]))
{
if (player == &players[displayplayers[i]])
{
focusangle = localangle[i];
focusaiming = localaiming[i];
break;
}
else
{
focusangle = mo->angle;
focusaiming = player->aiming;
}
focusangle = localangle[i];
focusaiming = localaiming[i];
break;
}
}
+7 -14
View File
@@ -1079,7 +1079,7 @@ static void R_SetupAimingFrame(player_t *player, camera_t *thiscam)
{
for (UINT8 i = 0; i <= splitscreen; i++)
{
if (player == &players[displayplayers[i]])
if (player == (i == 0 ? &players[consoleplayer] : &players[displayplayers[i]]))
{
newview->angle = localangle[i];
newview->aim = localaiming[i];
@@ -1095,22 +1095,15 @@ void R_SkyboxFrame(player_t *player)
camera_t *thiscam = &camera[0];
UINT8 i;
if (splitscreen)
for (i = 0; i <= splitscreen; i++)
{
for (i = 0; i <= splitscreen; i++)
if (player == (i == 0 ? &players[consoleplayer] : &players[displayplayers[i]]))
{
if (player == &players[displayplayers[i]])
{
thiscam = &camera[i];
R_SetViewContext(VIEWCONTEXT_SKY1 + i);
break;
}
thiscam = &camera[i];
R_SetViewContext(VIEWCONTEXT_SKY1 + i);
break;
}
}
else
{
R_SetViewContext(VIEWCONTEXT_SKY1);
}
// cut-away view stuff
newview->sky = true;
@@ -1205,7 +1198,7 @@ void R_SetupFrame(player_t *player, boolean skybox)
for (UINT8 i = 0; i <= splitscreen; i++)
{
if (player == &players[displayplayers[i]])
if (player == (i == 0 ? &players[consoleplayer] : &players[displayplayers[i]]))
{
thiscam = &camera[i];
chasecam = cv_chasecam[i].value;