mirror of https://github.com/ppy/osu
Fix legacy beatmap encoding
This commit is contained in:
parent
a3faf0a28e
commit
d0510222ae
|
@ -329,7 +329,13 @@ private void addPathData(TextWriter writer, IHasPath pathData, Vector2 position)
|
|||
|
||||
if (point.Type.Value != null)
|
||||
{
|
||||
if (point.Type.Value != lastType)
|
||||
// We've reached a new segment!
|
||||
|
||||
// To preserve compatibility with osu-stable as much as possible, segments with the same type are converted to use implicit segments by duplicating the control point.
|
||||
// One exception to this is when the last control point of the last segment was itself a duplicate, which can't be supported by osu-stable.
|
||||
bool lastPointWasDuplicate = i > 1 && pathData.Path.ControlPoints[i - 1].Position.Value == pathData.Path.ControlPoints[i - 2].Position.Value;
|
||||
|
||||
if (lastPointWasDuplicate || point.Type.Value != lastType)
|
||||
{
|
||||
switch (point.Type.Value)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue