Skip to content

Commit

Permalink
fix export bug for two-point slides
Browse files Browse the repository at this point in the history
  • Loading branch information
4yn committed May 4, 2021
1 parent 61793bc commit 10947c3
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions Ched/Components/Exporter/SusExporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,19 +175,23 @@ public void Export(Stream stream)
Type = p.IsVisible ? "3" : (p.IsCurve ? "4": "5")
}).Take(slide.Note.StepNotes.Count - 1).ToArray();
// Filter out consecutive curves
var lastStepType = steps[0].Type;
for (int i = 1; i < steps.Count(); i++)
if (steps.Count() != 0)
{
if (lastStepType == "4" && steps[i].Type == "4")
var lastStepType = steps[0].Type;
for (int i = 1; i < steps.Count(); i++)
{
steps[i] = new {
Tick = steps[i].Tick,
LaneIndex = slide.Note.StartLaneIndex,
Width = slide.Note.StartWidth,
Type = "5"
};
if (lastStepType == "4" && steps[i].Type == "4")
{
steps[i] = new
{
Tick = steps[i].Tick,
LaneIndex = slide.Note.StartLaneIndex,
Width = slide.Note.StartWidth,
Type = "5"
};
}
lastStepType = steps[i].Type;
}
lastStepType = steps[i].Type;
}
var endNote = slide.Note.StepNotes.OrderBy(p => p.TickOffset).Last();
var end = new[] { new
Expand Down

0 comments on commit 10947c3

Please sign in to comment.