1
0
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:
Arthur Araujo 2024-03-18 14:02:33 -03:00
parent 915a9682b5
commit c23212f4ef

View File

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