fixed bug in single button handling causing broken tapes (EM engine)
authorHolger Schemel <info@artsoft.org>
Sat, 23 Sep 2017 20:11:25 +0000 (22:11 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 23 Sep 2017 20:11:25 +0000 (22:11 +0200)
src/events.c
src/game.c
src/game_em/convert.c
src/game_em/export.h

index 80917b02007916c1b8957cc440b046b75bd32b3b..b450c2b0d547a79f587da1a82cd8821ed83bb86f 100644 (file)
@@ -1560,9 +1560,6 @@ void HandleKey(Key key, int key_status)
     static boolean element_dropped[MAX_PLAYERS] = { FALSE,FALSE,FALSE,FALSE };
     int pnr;
 
-    /* initialize unifying snap and drop buttons (EM engine) */
-    game_em.use_single_button = game_em.use_single_button_initial;
-
     for (pnr = 0; pnr < MAX_PLAYERS; pnr++)
     {
       byte key_action = 0;
@@ -1609,9 +1606,6 @@ void HandleKey(Key key, int key_status)
 
       if (tape.single_step && tape.recording && tape.pausing)
       {
-       /* do not unify snap and drop buttons in single-step mode (EM engine) */
-       game_em.use_single_button = FALSE;
-
        if (key_status == KEY_PRESSED && key_action & KEY_MOTION)
        {
          TapeTogglePause(TAPE_TOGGLE_AUTOMATIC);
index e87dcd04aef71ce57f0e6af83b8b5b8dcbfd7cd9..8ef02b4f830bf00a40337b6e32a91a3636a37905 100644 (file)
@@ -2698,7 +2698,7 @@ static void InitGameEngine()
   game.use_block_last_field_bug =
     (game.engine_version < VERSION_IDENT(3,1,1,0));
 
-  game_em.use_single_button = game_em.use_single_button_initial =
+  game_em.use_single_button =
     (game.engine_version > VERSION_IDENT(4,0,0,2));
 
   /* ---------------------------------------------------------------------- */
index 32c4b600b4b4e30a45a951de37edb5d23d135175..086bc7a3ea37cc80084ce83ba6af0e10a924eda7 100644 (file)
@@ -1110,7 +1110,7 @@ void prepare_em_level(void)
   game_em.any_player_moving = FALSE;
   game_em.any_player_snapping = FALSE;
 
-  game_em.use_single_button = game_em.use_single_button_initial = TRUE;
+  game_em.use_single_button = TRUE;
 
   game_em.last_moving_player = 0;      /* default: first player */
 
index 065d6214bb46e099e8a586b8ae5336b56159c32e..365cafe863a6b2bcc29b0166838a25d429a65bb7 100644 (file)
@@ -667,7 +667,6 @@ struct GameInfo_EM
   boolean any_player_moving;
   boolean any_player_snapping;
 
-  boolean use_single_button_initial;
   boolean use_single_button;
 
   int last_moving_player;