From 633d0244c9dfaf509bfdd5ea3bc9d37cfac7ffa5 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Wed, 18 Jan 2023 18:43:26 +0100 Subject: [PATCH] fixed bug with laser not passing alongside DF steel walls in MM engine This bug only happened in certain special cases where the laser beam had already touched a tile with DF style steel walls (from a side or an angle where it cannot pass) and later touching the same tile again from a different side or angle where it can pass (but without having touched another DF steel wall on any other tile in between). --- src/game_mm/mm_game.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/game_mm/mm_game.c b/src/game_mm/mm_game.c index 45c65634..48bc9a5b 100644 --- a/src/game_mm/mm_game.c +++ b/src/game_mm/mm_game.c @@ -1120,6 +1120,14 @@ void ScanLaser(void) if (rf) DrawLaser(rf - 1, DL_LASER_ENABLED); rf = laser.num_edges; + + if (!IS_DF_WALL_STEEL(element)) + { + // only used for scanning DF steel walls; reset for all other elements + last_LX = 0; + last_LY = 0; + last_hit_mask = 0; + } } #if 0 -- 2.34.1