mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 21:02:54 +08:00
Use GetLastObjectTime
to calculate mapped length
This commit is contained in:
parent
915a9682b5
commit
c23212f4ef
@ -3,9 +3,8 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Rulesets.Edit.Checks.Components;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
|
||||
namespace osu.Game.Rulesets.Edit.Checks
|
||||
{
|
||||
@ -20,7 +19,7 @@ namespace osu.Game.Rulesets.Edit.Checks
|
||||
|
||||
public IEnumerable<Issue> Run(BeatmapVerifierContext context)
|
||||
{
|
||||
double mappedLength = context.Beatmap.HitObjects.Last().GetEndTime();
|
||||
double mappedLength = context.Beatmap.GetLastObjectTime();
|
||||
double trackLength = context.WorkingBeatmap.Track.Length;
|
||||
|
||||
double mappedPercentage = Math.Round(mappedLength / trackLength * 100);
|
||||
|
Loading…
Reference in New Issue
Block a user