From ef86110516be7bb757806b8e0993f7283eda0a7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20B=C3=A1lint=20Misius?= Date: Mon, 11 Dec 2023 22:43:07 +0100 Subject: [PATCH] Fix can_move being set up too early As in, before element properties were populated. This broke everything that depended on can_move, probably most notably particle displacement based on the Weight property. It didn't help that once element properties were populated, any secondary call to init_can_move would fix the symptoms, such as when any custom element is added with Lua. --- src/simulation/SimulationData.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/simulation/SimulationData.cpp b/src/simulation/SimulationData.cpp index 1e101a851..cff258fe9 100644 --- a/src/simulation/SimulationData.cpp +++ b/src/simulation/SimulationData.cpp @@ -333,9 +333,9 @@ int SimulationData::GetParticleType(ByteString type) const SimulationData::SimulationData() { - init_can_move(); msections = LoadMenus(); wtypes = LoadWalls(); elements = GetElements(); tools = GetTools(); + init_can_move(); }