mirror of https://github.com/ppy/osu
Fixed issue where pick order was following ban order structure
This commit is contained in:
parent
60d6c0fe53
commit
a33a4c4d1d
|
@ -155,10 +155,14 @@ private void setNextMode()
|
|||
|
||||
var previousBan = CurrentMatch.Value.PicksBans.LastOrDefault()?.Team ?? roll_winner;
|
||||
|
||||
var nextColour = (CurrentMatch.Value.PicksBans.Count() >= 2 ? CurrentMatch.Value.PicksBans[^2]?.Team : previousBan) == TeamColour.Red ? TeamColour.Blue : TeamColour.Red;
|
||||
var nextColour = previousBan == TeamColour.Red ? TeamColour.Blue : TeamColour.Red;
|
||||
|
||||
bool hasAllBans = CurrentMatch.Value.PicksBans.Count(p => p.Type == ChoiceType.Ban) >= totalBansRequired;
|
||||
|
||||
if (!hasAllBans)
|
||||
// If it's the third ban or later, we need to check if it's the team's first or second ban in a row
|
||||
nextColour = (CurrentMatch.Value.PicksBans.Count() >= 2 ? CurrentMatch.Value.PicksBans[^2]?.Team : previousBan) == TeamColour.Red ? TeamColour.Blue : TeamColour.Red;
|
||||
|
||||
if (hasAllBans && pickType == ChoiceType.Ban)
|
||||
{
|
||||
// When switching from bans to picks, we don't rotate the team colour.
|
||||
|
|
Loading…
Reference in New Issue