mirror of
https://github.com/ppy/osu.git
synced 2025-01-30 21:25:36 +08:00
Merge pull request #31354 from bdach/show-hit-markers-for-repeats
Fix slider repeats not properly respecting "show hit markers" setting
This commit is contained in:
commit
2d4a3aa4f9
@ -377,6 +377,10 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
{
|
{
|
||||||
UpdateState(ArmedState.Idle);
|
UpdateState(ArmedState.Idle);
|
||||||
HeadCircle.SuppressHitAnimations();
|
HeadCircle.SuppressHitAnimations();
|
||||||
|
|
||||||
|
foreach (var repeat in repeatContainer)
|
||||||
|
repeat.SuppressHitAnimations();
|
||||||
|
|
||||||
TailCircle.SuppressHitAnimations();
|
TailCircle.SuppressHitAnimations();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -384,6 +388,10 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
{
|
{
|
||||||
UpdateState(ArmedState.Hit);
|
UpdateState(ArmedState.Hit);
|
||||||
HeadCircle.RestoreHitAnimations();
|
HeadCircle.RestoreHitAnimations();
|
||||||
|
|
||||||
|
foreach (var repeat in repeatContainer)
|
||||||
|
repeat.RestoreHitAnimations();
|
||||||
|
|
||||||
TailCircle.RestoreHitAnimations();
|
TailCircle.RestoreHitAnimations();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ using osu.Game.Rulesets.Objects.Drawables;
|
|||||||
using osu.Game.Rulesets.Osu.Skinning.Default;
|
using osu.Game.Rulesets.Osu.Skinning.Default;
|
||||||
using osu.Game.Skinning;
|
using osu.Game.Skinning;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||||
{
|
{
|
||||||
@ -163,5 +164,37 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
Arrow.Rotation = Interpolation.ValueAt(Math.Clamp(Clock.ElapsedFrameTime, 0, 100), Arrow.Rotation, aimRotation, 0, 50, Easing.OutQuint);
|
Arrow.Rotation = Interpolation.ValueAt(Math.Clamp(Clock.ElapsedFrameTime, 0, 100), Arrow.Rotation, aimRotation, 0, 50, Easing.OutQuint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region FOR EDITOR USE ONLY, DO NOT USE FOR ANY OTHER PURPOSE
|
||||||
|
|
||||||
|
internal void SuppressHitAnimations()
|
||||||
|
{
|
||||||
|
UpdateState(ArmedState.Idle);
|
||||||
|
UpdateComboColour();
|
||||||
|
|
||||||
|
// This method is called every frame in editor contexts, thus the lack of need for transforms.
|
||||||
|
|
||||||
|
bool hit = Time.Current >= HitStateUpdateTime;
|
||||||
|
|
||||||
|
if (hit)
|
||||||
|
{
|
||||||
|
// More or less matches stable (see https://github.com/peppy/osu-stable-reference/blob/bb57924c1552adbed11ee3d96cdcde47cf96f2b6/osu!/GameplayElements/HitObjects/Osu/HitCircleOsu.cs#L336-L338)
|
||||||
|
AccentColour.Value = Color4.White;
|
||||||
|
Alpha = Interpolation.ValueAt(Time.Current, 1f, 0f, HitStateUpdateTime, HitStateUpdateTime + 700);
|
||||||
|
}
|
||||||
|
|
||||||
|
Arrow.Alpha = hit ? 0 : 1;
|
||||||
|
|
||||||
|
LifetimeEnd = HitStateUpdateTime + 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void RestoreHitAnimations()
|
||||||
|
{
|
||||||
|
UpdateState(ArmedState.Hit);
|
||||||
|
UpdateComboColour();
|
||||||
|
Arrow.Alpha = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user