check for consoleplayer since displayplayer is who youre watching

This commit is contained in:
Alug committed 2025-01-04 02:29:57 +01:00
1 parent f9b1071539
commit 8cb7396f33
1 file changed
+4 -2
+4 -2
View File
@@ -3142,9 +3142,11 @@ void P_ToggleDemoCamera(UINT8 viewnum)
{
camera_t *cam = &camera[viewnum];
// dont let freecam be toggled when in spec lel
if (players[displayplayers[viewnum]].spectator)
// dont toggle freecam when in spec
// special case since only non splitscreen can change viewpoints
if ((!splitscreen && players[consoleplayer].spectator) || players[displayplayers[viewnum]].spectator)
{
cam->freecam = false;
return;
}