mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 09:58:21 +08:00
Ensure judgements aren't updated when ArmedState is not idle
This commit is contained in:
parent
1194e46ef1
commit
d7ac02d090
@ -5,6 +5,7 @@ using System.ComponentModel;
|
|||||||
using osu.Game.Rulesets.Objects.Drawables;
|
using osu.Game.Rulesets.Objects.Drawables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Rulesets.Objects.Types;
|
using osu.Game.Rulesets.Objects.Types;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||||
{
|
{
|
||||||
@ -31,7 +32,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
|
|
||||||
UpdatePreemptState();
|
UpdatePreemptState();
|
||||||
|
|
||||||
var offset = !AllJudged ? 0 : Time.Current - ((HitObject as IHasEndTime)?.EndTime ?? HitObject.StartTime);
|
var judgement = Judgements.FirstOrDefault();
|
||||||
|
var offset = judgement != null ? judgement.TimeOffset : 0;
|
||||||
using (BeginDelayedSequence(TIME_PREEMPT + offset, true))
|
using (BeginDelayedSequence(TIME_PREEMPT + offset, true))
|
||||||
UpdateCurrentState(state);
|
UpdateCurrentState(state);
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ namespace osu.Game.Rulesets.Judgements
|
|||||||
public bool IsHit => Result > HitResult.Miss;
|
public bool IsHit => Result > HitResult.Miss;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The offset at which this judgement occurred.
|
/// The offset from a perfect hit at which this judgement occurred.
|
||||||
/// Populated when added via <see cref="DrawableHitObject{TObject}.AddJudgement"/>.
|
/// Populated when added via <see cref="DrawableHitObject{TObject}.AddJudgement"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public double TimeOffset { get; internal set; }
|
public double TimeOffset { get; internal set; }
|
||||||
|
@ -138,7 +138,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
{
|
{
|
||||||
judgementOccurred = false;
|
judgementOccurred = false;
|
||||||
|
|
||||||
if (AllJudged)
|
if (AllJudged || State != ArmedState.Idle)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (NestedHitObjects != null)
|
if (NestedHitObjects != null)
|
||||||
|
Loading…
Reference in New Issue
Block a user