From: Holger Schemel Date: Fri, 19 May 2023 13:27:29 +0000 (+0200) Subject: fixed bugs with wrong X/Y access in element mask in MM engine X-Git-Tag: 4.3.6.0~7 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=b086cf74ed94a4e3e57f42242e0f066e01ea751c;p=rocksndiamonds.git fixed bugs with wrong X/Y access in element mask in MM engine --- diff --git a/src/game_mm/mm_game.c b/src/game_mm/mm_game.c index 46f914de..bc72f5bd 100644 --- a/src/game_mm/mm_game.c +++ b/src/game_mm/mm_game.c @@ -1708,8 +1708,8 @@ static boolean HitElement(int element, int hit_mask) int pos = getMaskFromElement(element); // check if we are entering empty space area after hitting edge - if (mm_masks[pos][dx1 / 2][dy1 / 2] != 'X' && - mm_masks[pos][dx2 / 2][dy2 / 2] != 'X') + if (mm_masks[pos][dy1 / 2][dx1 / 2] != 'X' && + mm_masks[pos][dy2 / 2][dx2 / 2] != 'X') { // we already know that we hit an edge, but use this function to go on if (HitOnlyAnEdge(hit_mask)) @@ -1998,7 +1998,7 @@ static boolean HitElement(int element, int hit_mask) { int pos = getMaskFromElement(element_side); - if (mm_masks[pos][dx / 2][dy / 2] == 'X') + if (mm_masks[pos][dy / 2][dx / 2] == 'X') laser.overloaded = TRUE; } }