mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Preserve Y position of hit objects in osu!catch
This commit is contained in:
@ -23,7 +23,8 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
|
||||
|
||||
protected override IEnumerable<CatchHitObject> ConvertHitObject(HitObject obj, IBeatmap beatmap, CancellationToken cancellationToken)
|
||||
{
|
||||
var positionData = obj as IHasXPosition;
|
||||
var xPositionData = obj as IHasXPosition;
|
||||
var yPositionData = obj as IHasYPosition;
|
||||
var comboData = obj as IHasCombo;
|
||||
|
||||
switch (obj)
|
||||
@ -36,10 +37,11 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
|
||||
Path = curveData.Path,
|
||||
NodeSamples = curveData.NodeSamples,
|
||||
RepeatCount = curveData.RepeatCount,
|
||||
X = positionData?.X ?? 0,
|
||||
X = xPositionData?.X ?? 0,
|
||||
NewCombo = comboData?.NewCombo ?? false,
|
||||
ComboOffset = comboData?.ComboOffset ?? 0,
|
||||
LegacyLastTickOffset = (obj as IHasLegacyLastTickOffset)?.LegacyLastTickOffset ?? 0
|
||||
LegacyLastTickOffset = (obj as IHasLegacyLastTickOffset)?.LegacyLastTickOffset ?? 0,
|
||||
LegacyConvertedY = yPositionData?.Y ?? CatchHitObject.DEFAULT_LEGACY_CONVERT_Y
|
||||
}.Yield();
|
||||
|
||||
case IHasDuration endTime:
|
||||
@ -59,7 +61,8 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
|
||||
Samples = obj.Samples,
|
||||
NewCombo = comboData?.NewCombo ?? false,
|
||||
ComboOffset = comboData?.ComboOffset ?? 0,
|
||||
X = positionData?.X ?? 0
|
||||
X = xPositionData?.X ?? 0,
|
||||
LegacyConvertedY = yPositionData?.Y ?? CatchHitObject.DEFAULT_LEGACY_CONVERT_Y
|
||||
}.Yield();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user