1
0
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:
Dan Balasescu 2022-09-08 17:40:20 +09:00 committed by GitHub
commit 6fa37fc5a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
} }