1
0
mirror of https://github.com/ppy/osu synced 2024-12-14 10:57:41 +00:00

Ensure judgements aren't updated when ArmedState is not idle

This commit is contained in:
Dean Herbert 2017-09-12 18:00:41 +09:00
parent 1194e46ef1
commit d7ac02d090
3 changed files with 5 additions and 3 deletions
osu.Game.Rulesets.Osu/Objects/Drawables
osu.Game/Rulesets
Judgements
Objects/Drawables

View File

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

View File

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

View File

@ -138,7 +138,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
{
judgementOccurred = false;
if (AllJudged)
if (AllJudged || State != ArmedState.Idle)
return false;
if (NestedHitObjects != null)