From 59f34a15261a5f973ea62823d4ceaffed46af0b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20B=C3=A1lint=20Misius?= Date: Tue, 7 Jan 2025 16:27:55 +0100 Subject: [PATCH] Fix pasting bailing early when any particle fails to spawn Broken since 462460b6b3f0, where the break in the old code was thoughtlessly moved to the new code, the issue being that create_part failing doesn't necessarily mean that we're out of particle IDs. I don't think pasting is a hot enough operation for such optimizations to be necessary, so continue should be fine. --- src/simulation/Simulation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index a5fb0cd89..3db57dc78 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -130,7 +130,7 @@ void Simulation::Load(const GameSave *save, bool includePressure, Vec2 bloc auto i = create_part(-3, x, y, tempPart.type); if (i == -1) { - break; + continue; } if (i > parts.lastActiveIndex) {