diff --git a/desktop_version/src/Game.h b/desktop_version/src/Game.h index 514e30d0..e78b6384 100644 --- a/desktop_version/src/Game.h +++ b/desktop_version/src/Game.h @@ -211,10 +211,6 @@ public: const char* saveFilePath; - int door_left; - int door_right; - int door_up; - int door_down; int roomx, roomy; int prevroomx, prevroomy; diff --git a/desktop_version/src/Logic.cpp b/desktop_version/src/Logic.cpp index c6c8597e..72d5f7ea 100644 --- a/desktop_version/src/Logic.cpp +++ b/desktop_version/src/Logic.cpp @@ -994,7 +994,7 @@ void gamelogic(void) obj.customwarpmodevon = false; int i = obj.getplayer(); - if (INBOUNDS_VEC(i, obj.entities) && ((game.door_down > -2 && obj.entities[i].yp >= 226-16) || (game.door_up > -2 && obj.entities[i].yp < -2+16) || (game.door_left > -2 && obj.entities[i].xp < -14+16) || (game.door_right > -2 && obj.entities[i].xp >= 308-16))){ + if (INBOUNDS_VEC(i, obj.entities) && (obj.entities[i].yp >= 226-16 || obj.entities[i].yp < -2+16 || obj.entities[i].xp < -14+16 || obj.entities[i].xp >= 308-16)){ //Player is leaving room obj.customwarplinecheck(i); } @@ -1134,12 +1134,12 @@ void gamelogic(void) { //Normal! Just change room int player = obj.getplayer(); - if (INBOUNDS_VEC(player, obj.entities) && game.door_down > -2 && obj.entities[player].yp >= 238) + if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].yp >= 238) { obj.entities[player].yp -= 240; GOTOROOM(game.roomx, game.roomy + 1); } - if (INBOUNDS_VEC(player, obj.entities) && game.door_up > -2 && obj.entities[player].yp < -2) + if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].yp < -2) { obj.entities[player].yp += 240; GOTOROOM(game.roomx, game.roomy - 1); @@ -1150,12 +1150,12 @@ void gamelogic(void) { //Normal! Just change room int player = obj.getplayer(); - if (INBOUNDS_VEC(player, obj.entities) && game.door_left > -2 && obj.entities[player].xp < -14) + if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].xp < -14) { obj.entities[player].xp += 320; GOTOROOM(game.roomx - 1, game.roomy); } - if (INBOUNDS_VEC(player, obj.entities) && game.door_right > -2 && obj.entities[player].xp >= 308) + if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].xp >= 308) { obj.entities[player].xp -= 320; GOTOROOM(game.roomx + 1, game.roomy); @@ -1169,12 +1169,12 @@ void gamelogic(void) { //This is minitower 1! int player = obj.getplayer(); - if (INBOUNDS_VEC(player, obj.entities) && game.door_left > -2 && obj.entities[player].xp < -14) + if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].xp < -14) { obj.entities[player].xp += 320; GOTOROOM(48, 52); } - if (INBOUNDS_VEC(player, obj.entities) && game.door_right > -2 && obj.entities[player].xp >= 308) + if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].xp >= 308) { obj.entities[player].xp -= 320; obj.entities[player].yp -= (71*8); @@ -1185,7 +1185,7 @@ void gamelogic(void) { //This is minitower 2! int player = obj.getplayer(); - if (INBOUNDS_VEC(player, obj.entities) && game.door_left > -2 && obj.entities[player].xp < -14) + if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].xp < -14) { if (obj.entities[player].yp > 300) { @@ -1199,7 +1199,7 @@ void gamelogic(void) GOTOROOM(50, 53); } } - if (INBOUNDS_VEC(player, obj.entities) && game.door_right > -2 && obj.entities[player].xp >= 308) + if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].xp >= 308) { obj.entities[player].xp -= 320; GOTOROOM(52, 53); @@ -1229,13 +1229,13 @@ void gamelogic(void) { //Do not wrap! Instead, go to the correct room int player = obj.getplayer(); - if (INBOUNDS_VEC(player, obj.entities) && game.door_left > -2 && obj.entities[player].xp < -14) + if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].xp < -14) { obj.entities[player].xp += 320; obj.entities[player].yp -= (671 * 8); GOTOROOM(108, 109); } - if (INBOUNDS_VEC(player, obj.entities) && game.door_right > -2 && obj.entities[player].xp >= 308) + if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].xp >= 308) { obj.entities[player].xp -= 320; GOTOROOM(110, 104); diff --git a/desktop_version/src/Map.cpp b/desktop_version/src/Map.cpp index 5d70f349..465c27e1 100644 --- a/desktop_version/src/Map.cpp +++ b/desktop_version/src/Map.cpp @@ -956,11 +956,6 @@ void mapclass::gotoroom(int rx, int ry) } } - game.door_up = rx + ((ry - 1) * 100); - game.door_down = rx + ((ry + 1) * 100); - game.door_right = rx + 1 + (ry * 100); - game.door_left = rx -1 + (ry * 100); - if (rx < game.roomx) { roomchangedir = 0;