mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Merge branch 'master' into editor-move-distance-snap-grid
This commit is contained in:
@ -64,9 +64,7 @@ namespace osu.Game.Rulesets.Edit
|
||||
/// <param name="commitStart">Whether this call is committing a value for HitObject.StartTime and continuing with further adjustments.</param>
|
||||
protected void BeginPlacement(bool commitStart = false)
|
||||
{
|
||||
// applies snapping to above time
|
||||
placementHandler.BeginPlacement(HitObject);
|
||||
|
||||
PlacementActive |= commitStart;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Framework.Utils;
|
||||
@ -46,6 +47,16 @@ namespace osu.Game.Rulesets.Objects
|
||||
|
||||
for (double t = currentTimingPoint.Time; Precision.DefinitelyBigger(endTime, t); t += barLength, currentBeat++)
|
||||
{
|
||||
var roundedTime = Math.Round(t, MidpointRounding.AwayFromZero);
|
||||
|
||||
// in the case of some bar lengths, rounding errors can cause t to be slightly less than
|
||||
// the expected whole number value due to floating point inaccuracies.
|
||||
// if this is the case, apply rounding.
|
||||
if (Precision.AlmostEquals(t, roundedTime))
|
||||
{
|
||||
t = roundedTime;
|
||||
}
|
||||
|
||||
BarLines.Add(new TBarLine
|
||||
{
|
||||
StartTime = t,
|
||||
|
@ -257,7 +257,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
}
|
||||
}
|
||||
|
||||
if (state.Value != ArmedState.Idle && LifetimeEnd == double.MaxValue || HitObject.HitWindows == null)
|
||||
if (LifetimeEnd == double.MaxValue && (state.Value != ArmedState.Idle || HitObject.HitWindows == null))
|
||||
Expire();
|
||||
|
||||
// apply any custom state overrides
|
||||
|
@ -22,8 +22,7 @@ namespace osu.Game.Rulesets.UI.Scrolling.Algorithms
|
||||
|
||||
public double GetDisplayStartTime(double originTime, float offset, double timeRange, float scrollLength)
|
||||
{
|
||||
double adjustedTime = TimeAt(-offset, originTime, timeRange, scrollLength);
|
||||
return adjustedTime - timeRange - 1000;
|
||||
return TimeAt(-(scrollLength + offset), originTime, timeRange, scrollLength);
|
||||
}
|
||||
|
||||
public float GetLength(double startTime, double endTime, double timeRange, float scrollLength)
|
||||
|
Reference in New Issue
Block a user