From 1297b09c4700e26477252192e69b9dde34cdb557 Mon Sep 17 00:00:00 2001 From: Misa Date: Thu, 23 Sep 2021 13:16:57 -0700 Subject: [PATCH] Fix regression from 2.3 with `destroy(platforms)` 2.3 introduced a regression with destroy(platforms). The problem was that isplatform wasn't being set to false when the entity got disabled, so if the platform was moving, it would keep moving until it hit a wall, instead of stopping immediately. --- desktop_version/src/Entity.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/desktop_version/src/Entity.cpp b/desktop_version/src/Entity.cpp index a131eca9..4bdf8379 100644 --- a/desktop_version/src/Entity.cpp +++ b/desktop_version/src/Entity.cpp @@ -1106,6 +1106,7 @@ bool entityclass::disableentity(int t) entities[t].size = -1; entities[t].type = -1; entities[t].rule = -1; + entities[t].isplatform = false; return true; } @@ -1223,7 +1224,8 @@ void entityclass::createentity(int xp, int yp, int t, int meta1, int meta2, int if (entities[i].invis && entities[i].size == -1 && entities[i].type == -1 - && entities[i].rule == -1) + && entities[i].rule == -1 + && !entities[i].isplatform) { reuse = true; entptr = &entities[i];