From 14e89d3f424dacca3acbf8a1bb3c56d47c73bab7 Mon Sep 17 00:00:00 2001 From: James R Date: Sun, 26 Feb 2023 02:23:47 -0800 Subject: [PATCH] Let director focus 1P if no more players are in game --- src/k_director.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/k_director.c b/src/k_director.c index a35c3da84..4f5737b4b 100644 --- a/src/k_director.c +++ b/src/k_director.c @@ -238,6 +238,13 @@ void K_UpdateDirector(void) return; } + // if there's only one player left in the list, just switch to that player + if (directorinfo.sortedplayers[0] != -1 && directorinfo.sortedplayers[1] == -1) + { + K_DirectorSwitch(directorinfo.sortedplayers[0], false); + return; + } + // aaight, time to walk through the standings to find the first interesting pair // NB: targetposition/sortedplayers is 0-indexed, aiming at the "back half" of a given pair by default. // we adjust for this when comparing to player->position or when looking at the leading player, Don't Freak Out @@ -291,4 +298,4 @@ void K_UpdateDirector(void) break; } -} \ No newline at end of file +}