Preserve Y position of hit objects in osu!catch

This commit is contained in:
ekrctb
2021-07-14 14:38:38 +09:00
parent 4b4c341fb8
commit 7f432665e5
6 changed files with 45 additions and 17 deletions

View File

@ -2,15 +2,20 @@
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Rulesets.Objects.Types;
using osuTK;
namespace osu.Game.Rulesets.Objects.Legacy.Catch
{
/// <summary>
/// Legacy osu!catch Hit-type, used for parsing Beatmaps.
/// </summary>
internal sealed class ConvertHit : ConvertHitObject, IHasCombo, IHasXPosition
internal sealed class ConvertHit : ConvertHitObject, IHasPosition, IHasCombo
{
public float X { get; set; }
public float X => Position.X;
public float Y => Position.Y;
public Vector2 Position { get; set; }
public bool NewCombo { get; set; }

View File

@ -30,7 +30,7 @@ namespace osu.Game.Rulesets.Objects.Legacy.Catch
return new ConvertHit
{
X = position.X,
Position = position,
NewCombo = newCombo,
ComboOffset = comboOffset
};
@ -47,7 +47,7 @@ namespace osu.Game.Rulesets.Objects.Legacy.Catch
return new ConvertSlider
{
X = position.X,
Position = position,
NewCombo = FirstObject || newCombo,
ComboOffset = comboOffset,
Path = new SliderPath(controlPoints, length),

View File

@ -2,15 +2,20 @@
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Rulesets.Objects.Types;
using osuTK;
namespace osu.Game.Rulesets.Objects.Legacy.Catch
{
/// <summary>
/// Legacy osu!catch Slider-type, used for parsing Beatmaps.
/// </summary>
internal sealed class ConvertSlider : Legacy.ConvertSlider, IHasXPosition, IHasCombo
internal sealed class ConvertSlider : Legacy.ConvertSlider, IHasPosition, IHasCombo
{
public float X { get; set; }
public float X => Position.X;
public float Y => Position.Y;
public Vector2 Position { get; set; }
public bool NewCombo { get; set; }