From: Holger Schemel Date: Mon, 1 Jul 2024 08:17:37 +0000 (+0200) Subject: fixed bug causing BD engine hanging in wrap-around scrolling edge case X-Git-Tag: 4.4.0.0-test-3~10 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=a027f851efb6f152594af57d465484ee697ae0fb;p=rocksndiamonds.git fixed bug causing BD engine hanging in wrap-around scrolling edge case --- diff --git a/src/game_bd/bd_graphics.c b/src/game_bd/bd_graphics.c index c509ec57..793987e2 100644 --- a/src/game_bd/bd_graphics.c +++ b/src/game_bd/bd_graphics.c @@ -334,6 +334,11 @@ boolean gd_scroll(GdGame *game, boolean exact_scroll, boolean immediate) scroll_speed_last = -1; // check if active player is visible at the moment. + // but only if scrolling happened at all! + if (!changed) + return FALSE; + + // check if active player is outside drawing area. if yes, we should wait for scrolling. return player_out_of_window(game, player_x, player_y); }