mirror of
https://github.com/ppy/osu.git
synced 2024-11-12 03:17:45 +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>
|
/// <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>
|
/// </summary>
|
||||||
public void StartMatch()
|
public void StartMatch()
|
||||||
{
|
{
|
||||||
if (Team1.Value == null || Team2.Value == null)
|
if (Team1.Value == null || Team2.Value == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (Team1Score.Value > 0 || Team2Score.Value > 0)
|
||||||
|
return;
|
||||||
|
|
||||||
Team1Score.Value = 0;
|
Team1Score.Value = 0;
|
||||||
Team2Score.Value = 0;
|
Team2Score.Value = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user