mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:57:39 +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.Framework.Graphics;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
using System.Linq;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
{
|
||||
@ -31,7 +32,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
|
||||
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))
|
||||
UpdateCurrentState(state);
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ namespace osu.Game.Rulesets.Judgements
|
||||
public bool IsHit => Result > HitResult.Miss;
|
||||
|
||||
/// <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"/>.
|
||||
/// </summary>
|
||||
public double TimeOffset { get; internal set; }
|
||||
|
@ -138,7 +138,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
{
|
||||
judgementOccurred = false;
|
||||
|
||||
if (AllJudged)
|
||||
if (AllJudged || State != ArmedState.Idle)
|
||||
return false;
|
||||
|
||||
if (NestedHitObjects != null)
|
||||
|
Loading…
Reference in New Issue
Block a user