Splitscreen: do not show "Save Replay" button until all local party members finish

- Local members, does not count online party members
This commit is contained in:
James R 2024-03-25 22:49:16 -07:00
parent 67fb52b552
commit 681e95ca0c

View file

@ -1333,9 +1333,20 @@ void P_DoPlayerExit(player_t *player, pflags_t flags)
} }
} }
if (!demo.savebutton && P_IsMachineLocalPlayer(player)) if (!demo.savebutton)
{
UINT8 outstanding = splitscreen + 1;
for (UINT8 i = 0; i <= splitscreen; ++i)
{
if (players[g_localplayers[i]].exiting)
outstanding--;
}
// Once the entire local party finishes (not
// online party), show the "Save Replay" button.
if (!outstanding)
demo.savebutton = leveltime; demo.savebutton = leveltime;
} }
}
} }
// //