fixed bug with wrong laser position for slope element check in MM engine
authorHolger Schemel <info@artsoft.org>
Fri, 19 May 2023 13:43:17 +0000 (15:43 +0200)
committerHolger Schemel <info@artsoft.org>
Fri, 19 May 2023 13:43:17 +0000 (15:43 +0200)
src/game_mm/mm_game.c

index e35b1321a1bcb595733fe78a9473a46343b675d9..58ae03db5ef0d351f7eb7a4546a7ff93946ae541 100644 (file)
@@ -1956,8 +1956,8 @@ static boolean HitElement(int element, int hit_mask)
       {
        int elx, ely;
 
-       elx = getLevelFromLaserX(LX);
-       ely = getLevelFromLaserY(LY);
+       elx = getLevelFromLaserX(LX + XS);
+       ely = getLevelFromLaserY(LY + YS);
 
        if (IN_LEV_FIELD(elx, ely))
        {