check for consoleplayer since displayplayer is who youre watching

This commit is contained in:
Alug committed 2025-01-04 01:55:40 +01:00
1 parent ef94e1051f
commit f733bf140e
1 file changed
+4 -2
+4 -2
View File
@@ -3139,9 +3139,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;
}