From 6d26e1e4259343003f378829a3f18ee5f7e7cdcd Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Mon, 23 Jan 2023 00:27:36 +0100 Subject: [PATCH] fixed bug with re-scanning laser when rotating teleporter in MM engine The "fix" in commit 1b2237c9 fixed some old problems with handling teleporter elements, but caused new problems with overheating which should not happen. This change seems to fix both cases. --- src/game_mm/mm_game.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/game_mm/mm_game.c b/src/game_mm/mm_game.c index 8583a9a7..20e27068 100644 --- a/src/game_mm/mm_game.c +++ b/src/game_mm/mm_game.c @@ -3060,8 +3060,6 @@ void RotateMirror(int x, int y, int button) IS_POLAR(Tile[x][y]) || IS_POLAR_CROSS(Tile[x][y])) && x == ELX && y == ELY) { - check = 0; - if (IS_BEAMER(Tile[x][y])) { #if 0 @@ -3069,12 +3067,13 @@ void RotateMirror(int x, int y, int button) LX, LY, laser.beamer_edge, laser.beamer[1].num); #endif -#if 0 - laser.num_edges--; -#endif + if (check == 1) + laser.num_edges--; } ScanLaser(); + + check = 0; } if (check == 2) -- 2.34.1