Merge branch 'fix-intermission-parties' into 'master'

Fix Party management breaking during Intermission and Vote

Closes #499

See merge request KartKrew/Kart!1903
This commit is contained in:
Oni 2024-02-03 19:41:57 +00:00
commit d755d83778
2 changed files with 8 additions and 9 deletions

View file

@ -1856,7 +1856,7 @@ Command_Invite_f (void)
return;
}
if (r_splitscreen >= MAXSPLITSCREENPLAYERS)
if (G_PartySize(consoleplayer) >= MAXSPLITSCREENPLAYERS)
{
CONS_Alert(CONS_WARNING, "Your party is full!\n");
return;
@ -1983,7 +1983,7 @@ Command_RejectInvite_f (void)
static void
Command_LeaveParty_f (void)
{
if (r_splitscreen > splitscreen)
if (G_PartySize(consoleplayer) > G_LocalSplitscreenPartySize(consoleplayer))
{
CONS_Printf("\x85Leaving party...\n");

View file

@ -128,16 +128,15 @@ public:
return;
}
// Rendering stuff is not valid outside of levels.
if (!G_GamestateUsesLevel())
{
return;
}
for (std::size_t i = 0; i < size(); ++i)
{
displayplayers[i] = at(i);
G_FixCamera(1 + i);
// Camera is not valid outside of levels.
if (G_GamestateUsesLevel())
{
G_FixCamera(1 + i);
}
}
r_splitscreen = size() - 1;