mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'fix-shuffleloser-spec' into 'master'
Don't spectate player with shuffleloser on if a player spectated mid-race Closes #310 See merge request kart-krew-dev/ring-racers!52
This commit is contained in:
commit
6b95e3e218
1 changed files with 6 additions and 1 deletions
|
|
@ -858,7 +858,12 @@ void K_RetireBots(void)
|
||||||
std::stable_sort(humans.begin(), humans.end(), CompareReplacements);
|
std::stable_sort(humans.begin(), humans.end(), CompareReplacements);
|
||||||
std::stable_sort(bots.begin(), bots.end(), CompareReplacements);
|
std::stable_sort(bots.begin(), bots.end(), CompareReplacements);
|
||||||
|
|
||||||
if (G_GametypeHasSpectators() == true && grandprixinfo.gp == false && cv_shuffleloser.value != 0)
|
// If a player spectated mid-race or mid-duel, they will be placed in-game by K_CheckSpectateStatus,
|
||||||
|
// and their position will be set to 0. Since we're only replacing one player as of now, there's no need
|
||||||
|
// to do anything; a player has already been replaced.
|
||||||
|
bool player_already_joined = (!humans.empty() && humans[0]->position == 0);
|
||||||
|
|
||||||
|
if (G_GametypeHasSpectators() == true && grandprixinfo.gp == false && !player_already_joined && cv_shuffleloser.value != 0)
|
||||||
{
|
{
|
||||||
// While joiners and players still exist, insert joiners.
|
// While joiners and players still exist, insert joiners.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue