Fixed update condition

This commit is contained in:
EVAST9919 2017-05-11 02:34:57 +03:00
parent c0acc1799b
commit ea0add2354
2 changed files with 3 additions and 4 deletions

View File

@ -145,7 +145,7 @@ namespace osu.Game.Screens.Play
double progress = ((audioClock?.CurrentTime ?? Time.Current) - firstHitTime) / (lastHitTime - firstHitTime);
if((int)progress * 100 < 100)
if(progress < 1)
{
bar.UpdatePosition((float)progress);
graph.Progress = (int)(graph.ColumnCount * progress);

View File

@ -74,8 +74,9 @@ namespace osu.Game.Screens.Play
base.Update();
double songCurrentTime = AudioClock.CurrentTime - startTime;
int currentPercent = (int)(songCurrentTime / (endTime - startTime) * 100);
if(songCurrentTime < endTime - startTime)
if (currentPercent <= 100)
{
int currentSecond = TimeSpan.FromMilliseconds(songCurrentTime).Seconds;
@ -92,8 +93,6 @@ namespace osu.Game.Screens.Play
timeLeft.Text = @"-" + TimeSpan.FromMilliseconds(endTime - AudioClock.CurrentTime).ToString(@"m\:ss");
}
int currentPercent = (int)(songCurrentTime / (endTime - startTime) * 100) + 1;
if (currentPercent != previousPercent)
{
previousPercent = currentPercent;