mirror of
https://github.com/osukey/osukey.git
synced 2025-06-08 12:58:01 +09:00
Move second call to shiftNestedObjects
to a more understandable location
This commit is contained in:
parent
d6c4be207b
commit
a08a4aa911
@ -91,8 +91,13 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
{
|
{
|
||||||
case Slider slider:
|
case Slider slider:
|
||||||
shiftNestedObjects(slider, Vector2.Subtract(slider.Position, current.PositionOriginal));
|
shiftNestedObjects(slider, Vector2.Subtract(slider.Position, current.PositionOriginal));
|
||||||
|
|
||||||
|
var oldPos = new Vector2(slider.Position.X, slider.Position.Y);
|
||||||
|
|
||||||
moveSliderIntoPlayfield(slider, current);
|
moveSliderIntoPlayfield(slider, current);
|
||||||
|
|
||||||
|
shiftNestedObjects(slider, Vector2.Subtract(slider.Position, oldPos));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,8 +156,6 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void moveSliderIntoPlayfield(Slider slider, RandomObjectInfo currentObjectInfo)
|
private void moveSliderIntoPlayfield(Slider slider, RandomObjectInfo currentObjectInfo)
|
||||||
{
|
{
|
||||||
var oldPos = new Vector2(slider.Position.X, slider.Position.Y);
|
|
||||||
|
|
||||||
// Min. distances from the slider's position to the playfield border
|
// Min. distances from the slider's position to the playfield border
|
||||||
var minMargin = new MarginPadding();
|
var minMargin = new MarginPadding();
|
||||||
|
|
||||||
@ -181,10 +184,6 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
|
|
||||||
currentObjectInfo.PositionRandomised = slider.Position;
|
currentObjectInfo.PositionRandomised = slider.Position;
|
||||||
currentObjectInfo.EndPositionRandomised = slider.EndPosition;
|
currentObjectInfo.EndPositionRandomised = slider.EndPosition;
|
||||||
|
|
||||||
var shift = Vector2.Subtract(slider.Position, oldPos);
|
|
||||||
|
|
||||||
shiftNestedObjects(slider, shift);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user