mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 08:32:57 +08:00
fix legacy encoder writing sample info while not writing node samples
This commit is contained in:
parent
79f3cfec91
commit
139a1d7e6d
@ -476,16 +476,16 @@ namespace osu.Game.Beatmaps.Formats
|
||||
|
||||
if (curveData != null)
|
||||
{
|
||||
for (int i = 0; i < curveData.NodeSamples.Count; i++)
|
||||
for (int i = 0; i < curveData.SpanCount() + 1; i++)
|
||||
{
|
||||
writer.Write(FormattableString.Invariant($"{(int)toLegacyHitSoundType(curveData.NodeSamples[i])}"));
|
||||
writer.Write(i != curveData.NodeSamples.Count - 1 ? "|" : ",");
|
||||
writer.Write(FormattableString.Invariant($"{(i < curveData.NodeSamples.Count ? (int)toLegacyHitSoundType(curveData.NodeSamples[i]) : 0)}"));
|
||||
writer.Write(i != curveData.SpanCount() ? "|" : ",");
|
||||
}
|
||||
|
||||
for (int i = 0; i < curveData.NodeSamples.Count; i++)
|
||||
for (int i = 0; i < curveData.SpanCount() + 1; i++)
|
||||
{
|
||||
writer.Write(getSampleBank(curveData.NodeSamples[i], true));
|
||||
writer.Write(i != curveData.NodeSamples.Count - 1 ? "|" : ",");
|
||||
writer.Write(i < curveData.NodeSamples.Count ? getSampleBank(curveData.NodeSamples[i], true) : "0:0");
|
||||
writer.Write(i != curveData.SpanCount() ? "|" : ",");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user