diff --git a/Celeste.Mod.mm/Mod/Core/CoreMapDataProcessor.cs b/Celeste.Mod.mm/Mod/Core/CoreMapDataProcessor.cs index a1fd73172..f666e58bf 100644 --- a/Celeste.Mod.mm/Mod/Core/CoreMapDataProcessor.cs +++ b/Celeste.Mod.mm/Mod/Core/CoreMapDataProcessor.cs @@ -121,11 +121,12 @@ public override void Reset() { // assign berries with invalid checkpoint ID to final checkpoint if (checkpoint > Checkpoint) { Logger.Log(LogLevel.Warn, "core", $"Invalid checkpoint ID {checkpoint} for berries in map {Mode.Path}. Reassigning to last checkpoint."); + int order = MaximumBerryOrderPerCheckpoint.GetValueOrDefault(Checkpoint, -1); foreach (var placedBerry in placedBerries.OrderBy(kv => kv.Key)) { BinaryPacker.Element berry = placedBerry.Value; berry.SetAttr("checkpointID", Checkpoint); - berry.SetAttr("order", MaximumBerryOrderPerCheckpoint[Checkpoint] + 1); - MaximumBerryOrderPerCheckpoint[Checkpoint]++; + berry.SetAttr("order", order + 1); + order++; } } }