From 98ac1fdb53d7ce3c28f0b2187c56c4d543ad7cfe Mon Sep 17 00:00:00 2001 From: Info Teddy Date: Thu, 30 Jan 2020 19:41:53 -0800 Subject: [PATCH] Set customwarpmode when createentitying warp lines This fixes a bug where warp lines created through createentity wouldn't work without there already being a warp line present in the room as an edentity. --- desktop_version/src/Entity.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/desktop_version/src/Entity.cpp b/desktop_version/src/Entity.cpp index 751b4f4f..f2b43123 100644 --- a/desktop_version/src/Entity.cpp +++ b/desktop_version/src/Entity.cpp @@ -2621,6 +2621,7 @@ void entityclass::createentity( Game& game, float xp, float yp, int t, float vx //entities[k].colour = 0; entities[k].onentity = 1; entities[k].invis=true; + if (map.custommode) customwarpmode = true; break; case 52: //Vertical Warp Line entities[k].rule = 5; @@ -2634,6 +2635,7 @@ void entityclass::createentity( Game& game, float xp, float yp, int t, float vx //entities[k].colour = 0; entities[k].onentity = 1; entities[k].invis=true; + if (map.custommode) customwarpmode = true; break; case 53: //Horizontal Warp Line entities[k].rule = 7; @@ -2646,6 +2648,7 @@ void entityclass::createentity( Game& game, float xp, float yp, int t, float vx entities[k].h = 1; entities[k].onentity = 1; entities[k].invis=true; + if (map.custommode) customwarpmode = true; break; case 54: //Horizontal Warp Line entities[k].rule = 7; @@ -2658,6 +2661,7 @@ void entityclass::createentity( Game& game, float xp, float yp, int t, float vx entities[k].h = 1; entities[k].onentity = 1; entities[k].invis=true; + if (map.custommode) customwarpmode = true; break; case 55: // Crew Member (custom, collectable) //1 - position in array