fixed single-step mode for mouse click events
authorHolger Schemel <info@artsoft.org>
Sat, 3 Oct 2020 22:56:42 +0000 (00:56 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 3 Oct 2020 23:44:51 +0000 (01:44 +0200)
Before, when using mouse click events as CE change events, pressing a
mouse button in the playfield when in single-step mode was immediately
followed by entering pause mode again.

With this change, pause mode is not entered as long as a mouse button
is pressed. (This already works similarly in the MM game engine.)

src/game.c

index 0d28b40b2961e8774cd2cdea2d4f47feb68aa263..5e4e151fe3134c7548cce810dff6eb1f72fe7648 100644 (file)
@@ -11210,7 +11210,8 @@ static void CheckSingleStepMode(struct PlayerInfo *player)
        player stopped moving after one tile (or never starts moving at all) */
     if (!player->is_moving &&
        !player->is_pushing &&
        player stopped moving after one tile (or never starts moving at all) */
     if (!player->is_moving &&
        !player->is_pushing &&
-       !player->is_dropping_pressed)
+       !player->is_dropping_pressed &&
+       !player->effective_mouse_action.button)
       TapeTogglePause(TAPE_TOGGLE_AUTOMATIC);
   }
 
       TapeTogglePause(TAPE_TOGGLE_AUTOMATIC);
   }