From 78c319c34d7d229c42565733d2114c73bb9af896 Mon Sep 17 00:00:00 2001 From: Misa Date: Thu, 22 Apr 2021 15:41:09 -0700 Subject: [PATCH] Fix rescuable crewmates not warping The game excluded every entity whose `type` was 50 or higher. The `type` of rescuable crewmates is 55. Could some levels be broken by this behavior? Unlikely; without warping, the crewmates would end up falling out of the room and would become unrescuable. So this is more likely to fix than to break. But more importantly, *no one knows that rescuable crewmates don't warp*. If anyone would know, it would be me, because I've been in the custom levels community for over 7 years - and yet, during that time, I have not seen anyone run into this corner case. If they did, I would remember! This implies that people simply have never thought about putting rescuable crewmates in places where they would warp - or they have, ran into this issue, and worked around it. With those two reasons, I'm comfortable fixing this inconsistency. --- desktop_version/src/Logic.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/desktop_version/src/Logic.cpp b/desktop_version/src/Logic.cpp index 443d48fa..77464c95 100644 --- a/desktop_version/src/Logic.cpp +++ b/desktop_version/src/Logic.cpp @@ -961,7 +961,8 @@ void gamelogic(void) size_t i; for (i = 0; i < obj.entities.size(); ++i) { - if (obj.entities[i].type >= 50 /* Don't warp warp lines */ + if ((obj.entities[i].type >= 51 + && obj.entities[i].type <= 54) /* Don't warp warp lines */ || obj.entities[i].size >= 12) /* Don't warp gravitron squares */ { continue; @@ -1018,7 +1019,8 @@ void gamelogic(void) size_t i; for (i = 0; i < obj.entities.size(); ++i) { - if (obj.entities[i].type >= 50) /* Don't warp warp lines */ + if (obj.entities[i].type >= 51 + && obj.entities[i].type <= 54) /* Don't warp warp lines */ { continue; } @@ -1049,7 +1051,8 @@ void gamelogic(void) size_t i; for (i = 0; i < obj.entities.size(); ++i) { - if (obj.entities[i].type >= 50 /* Don't warp warp lines */ + if ((obj.entities[i].type >= 51 + && obj.entities[i].type <= 54) /* Don't warp warp lines */ || obj.entities[i].rule == 0) /* Don't warp the player */ { continue;