mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 00:53:56 +09: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:
@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user