From: Holger Schemel Date: Wed, 18 Jan 2023 17:43:26 +0000 (+0100) Subject: fixed bug with laser not passing alongside DF steel walls in MM engine X-Git-Tag: 4.3.5.0~37 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=633d0244c9dfaf509bfdd5ea3bc9d37cfac7ffa5;p=rocksndiamonds.git 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). --- 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