mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Update code to support new inspectcode analysis rules
This commit is contained in:
@ -1,8 +1,10 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
|
||||
@ -34,10 +36,12 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
foreach (var h in objects)
|
||||
{
|
||||
IHasEndTime end = h as IHasEndTime;
|
||||
var endTime = Math.Max((h as IHasEndTime)?.EndTime ?? h.StartTime, h.StartTime);
|
||||
|
||||
Debug.Assert(endTime > h.StartTime);
|
||||
|
||||
int startRange = (int)((h.StartTime - firstHit) / interval);
|
||||
int endRange = (int)(((end?.EndTime > 0 ? end.EndTime : h.StartTime) - firstHit) / interval);
|
||||
int endRange = (int)((endTime - firstHit) / interval);
|
||||
for (int i = startRange; i <= endRange; i++)
|
||||
Values[i]++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user