mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 17:32:54 +08:00
Don't merge adjacent legacy Catmull segments
This commit is contained in:
parent
fe49a7e678
commit
731f0960ec
@ -22,7 +22,7 @@ namespace osu.Game.Beatmaps.Formats
|
||||
{
|
||||
public class LegacyBeatmapEncoder
|
||||
{
|
||||
public const int LATEST_VERSION = 128;
|
||||
public const int FIRST_LAZER_VERSION = 128;
|
||||
|
||||
/// <summary>
|
||||
/// osu! is generally slower than taiko, so a factor is added to increase
|
||||
@ -55,7 +55,7 @@ namespace osu.Game.Beatmaps.Formats
|
||||
|
||||
public void Encode(TextWriter writer)
|
||||
{
|
||||
writer.WriteLine($"osu file format v{LATEST_VERSION}");
|
||||
writer.WriteLine($"osu file format v{FIRST_LAZER_VERSION}");
|
||||
|
||||
writer.WriteLine();
|
||||
handleGeneral(writer);
|
||||
|
@ -336,10 +336,14 @@ namespace osu.Game.Rulesets.Objects.Legacy
|
||||
|
||||
while (++endIndex < vertices.Length - endPointLength)
|
||||
{
|
||||
// Keep incrementing while an implicit segment doesn't need to be started
|
||||
// Keep incrementing while an implicit segment doesn't need to be started.
|
||||
if (vertices[endIndex].Position != vertices[endIndex - 1].Position)
|
||||
continue;
|
||||
|
||||
// Adjacent legacy Catmull segments should be treated as a single segment.
|
||||
if (FormatVersion < LegacyBeatmapEncoder.FIRST_LAZER_VERSION && type == PathType.Catmull)
|
||||
continue;
|
||||
|
||||
// The last control point of each segment is not allowed to start a new implicit segment.
|
||||
if (endIndex == vertices.Length - endPointLength - 1)
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user