1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 15:22:55 +08:00

Fix note placement offset not working for down-scroll

This commit is contained in:
smoogipoo 2019-10-03 18:21:50 +09:00
parent 754fbc59e1
commit 0a409075be

View File

@ -111,8 +111,23 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints
private Vector2 applyPositionOffset(Vector2 position, bool reverse)
{
position.Y += (scrollingInfo.Direction.Value == ScrollingDirection.Up && !reverse ? -1 : 1) * NotePiece.NOTE_HEIGHT / 2;
return position;
float offset = 0;
switch (scrollingInfo.Direction.Value)
{
case ScrollingDirection.Up:
offset = -NotePiece.NOTE_HEIGHT / 2;
break;
case ScrollingDirection.Down:
offset = NotePiece.NOTE_HEIGHT / 2;
break;
}
if (reverse)
offset = -offset;
return new Vector2(position.X, position.Y + offset);
}
}
}