X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fgame_mm%2Fmm_game.c;fp=src%2Fgame_mm%2Fmm_game.c;h=87ee350cc78027170fcc03aaeeeae3a87bbddbda;hp=0aaaaddaa3e84da2e47e99eff4416dcb81300fec;hb=98cdc60c12229af0a1672372157d52afe8edd3d0;hpb=f4079668f45b499431c8bad4040eb5fd62dba6e7 diff --git a/src/game_mm/mm_game.c b/src/game_mm/mm_game.c index 0aaaadda..87ee350c 100644 --- a/src/game_mm/mm_game.c +++ b/src/game_mm/mm_game.c @@ -1073,9 +1073,13 @@ static void ScanLaser(void) if (!IN_LEV_FIELD(ELX, ELY)) { - // check if laser is still inside visible playfield area - if (cSX + LX >= REAL_SX && cSX + LX < REAL_SX + FULL_SXSIZE && - cSY + LY >= REAL_SY && cSY + LY < REAL_SY + FULL_SYSIZE) + // laser next step position + int x = cSX + LX + XS; + int y = cSY + LY + YS; + + // check if next step of laser is still inside visible playfield area + if (x >= REAL_SX && x < REAL_SX + FULL_SXSIZE && + y >= REAL_SY && y < REAL_SY + FULL_SYSIZE) { // go on with another step LX += XS;