1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 09:27:29 +08:00

Fixed judgements with MG mod without causing side effects

This commit is contained in:
DavidBeh 2024-04-23 23:24:51 +02:00
parent 331f1f31b0
commit 3a914b9337
3 changed files with 2 additions and 15 deletions

View File

@ -81,10 +81,6 @@ namespace osu.Game.Rulesets.Osu.Mods
float x = (float)Interpolation.DampContinuously(hitObject.X, destination.X, dampLength, clock.ElapsedFrameTime);
float y = (float)Interpolation.DampContinuously(hitObject.Y, destination.Y, dampLength, clock.ElapsedFrameTime);
// I added these two lines
/*if (hitObject is DrawableOsuHitObject h)
h.HitObject.Position = new Vector2(x, y);
*/
hitObject.Position = new Vector2(x, y);
}
}

View File

@ -41,10 +41,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
if (JudgedObject is DrawableOsuHitObject osuObject)
{
Position = osuObject.ToSpaceOfOtherDrawable(Vector2.Zero, Parent);
// Works only for normal hit circles, also with magnetised:
// Position = osuObject.Position;
Position = osuObject.ToSpaceOfOtherDrawable(osuObject.OriginPosition, Parent!);
Scale = new Vector2(osuObject.HitObject.Scale);
}
}

View File

@ -8,7 +8,6 @@ using osu.Game.Rulesets.Objects.Types;
using System.Collections.Generic;
using osu.Game.Rulesets.Objects;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Threading;
using Newtonsoft.Json;
using osu.Framework.Bindables;
@ -25,7 +24,6 @@ namespace osu.Game.Rulesets.Osu.Objects
{
public class Slider : OsuHitObject, IHasPathWithRepeats, IHasSliderVelocity, IHasGenerateTicks
{
private static readonly ConditionalWeakTable<HitObject, StrongBox<double>> SliderProgress = new ConditionalWeakTable<HitObject, StrongBox<double>>();
public double EndTime => StartTime + this.SpanCount() * Path.Distance / Velocity;
@ -204,7 +202,6 @@ namespace osu.Game.Rulesets.Osu.Objects
Position = Position + Path.PositionAt(e.PathProgress),
StackHeight = StackHeight,
});
SliderProgress.AddOrUpdate(NestedHitObjects.Last(), new StrongBox<double>(e.PathProgress));
break;
case SliderEventType.Head:
@ -236,7 +233,6 @@ namespace osu.Game.Rulesets.Osu.Objects
Position = Position + Path.PositionAt(e.PathProgress),
StackHeight = StackHeight,
});
SliderProgress.Add(NestedHitObjects.Last(), new StrongBox<double>(e.PathProgress));
break;
}
}
@ -254,9 +250,7 @@ namespace osu.Game.Rulesets.Osu.Objects
if (TailCircle != null)
TailCircle.Position = EndPosition;
foreach (var hitObject in NestedHitObjects)
if (hitObject is SliderTick or SliderRepeat)
((OsuHitObject)hitObject).Position = Position + Path.PositionAt(SliderProgress.TryGetValue(hitObject, out var progress) ? progress?.Value ?? 0 : 0);
// Positions of other nested hitobjects are not updated
}
protected void UpdateNestedSamples()