From 9d8c2cd70316f055800f146f0942ce495ba5b207 Mon Sep 17 00:00:00 2001 From: James R Date: Sun, 26 Feb 2023 21:39:37 -0800 Subject: [PATCH] Director: skip splitscreen players when switching This makes sure director only tries switching to players who aren't splitscreen players. --- src/k_director.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/k_director.c b/src/k_director.c index 51158f8eb..8e62fe521 100644 --- a/src/k_director.c +++ b/src/k_director.c @@ -285,8 +285,20 @@ void K_UpdateDirector(void) target = directorinfo.sortedplayers[targetposition]; + // stop here since we're already viewing this player + if (*displayplayerp == target) + { + break; + } + + // if this is a splitscreen player, try next pair + if (P_IsDisplayPlayer(&players[target])) + { + continue; + } + // if we're certain the back half of the pair is actually in this position, try to switch - if (*displayplayerp != target && !players[target].positiondelay) + if (!players[target].positiondelay) { K_DirectorSwitch(target, false); }