From: Holger Schemel Date: Fri, 7 Apr 2023 10:47:25 +0000 (+0200) Subject: removed hardcoding playfield viewport border X-Git-Tag: 4.3.6.0~43 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=8babd60258369f500c743b4f239d5615fb7e65ba;p=rocksndiamonds.git removed hardcoding playfield viewport border --- diff --git a/src/game_mm/mm_game.c b/src/game_mm/mm_game.c index ea6faa95..49200caa 100644 --- a/src/game_mm/mm_game.c +++ b/src/game_mm/mm_game.c @@ -847,11 +847,11 @@ static void GameOver_MM(int game_over_cause) static void AddLaserEdge(int lx, int ly) { - int sxsize = MAX(SXSIZE, lev_fieldx * TILEX); - int sysize = MAX(SYSIZE, lev_fieldy * TILEY); + int full_sxsize = MAX(FULL_SXSIZE, lev_fieldx * TILEX); + int full_sysize = MAX(FULL_SYSIZE, lev_fieldy * TILEY); - if (dSX + lx < -2 || dSX + lx >= sxsize + 2 || - dSY + ly < -2 || dSY + ly >= sysize + 2) + if (SX + dSX + lx < REAL_SX || SX + dSX + lx >= REAL_SX + full_sxsize || + SY + dSY + ly < REAL_SY || SY + dSY + ly >= REAL_SY + full_sysize) { Warn("AddLaserEdge: out of bounds: %d, %d", lx, ly);