Merge branch 'prisons-reset' into 'master'

Fix Battle not resetting to Prisons when the server empties to 1P

Closes #1277

See merge request KartKrew/Kart!2280
This commit is contained in:
Sal 2024-04-14 17:10:49 +00:00
commit 9964d022f7

View file

@ -179,25 +179,25 @@ void K_CheckBumpers(void)
return;
}
}
else if (eliminated >= numingame - 1)
else if (numingame > 1)
{
// If every other player is eliminated, the
// last player standing wins by default.
if (numingame > 1)
if (eliminated >= numingame - 1)
{
K_EndBattleRound(kingofthehill != -1 ? &players[kingofthehill] : NULL);
return;
return;
}
}
if (numingame <= 1)
else
{
if ((gametyperules & GTR_PRISONS) && !battleprisons && (K_CanChangeRules(true) == true))
{
// Reset map to turn on battle prisons
if (server)
D_MapChange(gamemap, gametype, encoremode, true, 0, false, false);
D_MapChange(gamemap, gametype, encoremode, true, 1, false, false);
return;
}
return;
}
}