mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 15:33:05 +08:00
Merge pull request #20186 from peppy/fix-score-reset
Fix clicking an in-progress match in bracket view potentially resetting scores
This commit is contained in:
commit
6fa37fc5a4
@ -106,13 +106,16 @@ namespace osu.Game.Tournament.Models
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialise this match with zeroed scores. Will be a noop if either team is not present.
|
||||
/// Initialise this match with zeroed scores. Will be a noop if either team is not present or if either of the scores are non-zero.
|
||||
/// </summary>
|
||||
public void StartMatch()
|
||||
{
|
||||
if (Team1.Value == null || Team2.Value == null)
|
||||
return;
|
||||
|
||||
if (Team1Score.Value > 0 || Team2Score.Value > 0)
|
||||
return;
|
||||
|
||||
Team1Score.Value = 0;
|
||||
Team2Score.Value = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user