From: Holger Schemel Date: Sat, 23 Sep 2017 20:11:25 +0000 (+0200) Subject: fixed bug in single button handling causing broken tapes (EM engine) X-Git-Tag: 4.0.1.0~11 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=520916c89d7d96944bf3d66e3caa5afd840df74c;p=rocksndiamonds.git fixed bug in single button handling causing broken tapes (EM engine) --- diff --git a/src/events.c b/src/events.c index 80917b02..b450c2b0 100644 --- a/src/events.c +++ b/src/events.c @@ -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); diff --git a/src/game.c b/src/game.c index e87dcd04..8ef02b4f 100644 --- a/src/game.c +++ b/src/game.c @@ -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)); /* ---------------------------------------------------------------------- */ diff --git a/src/game_em/convert.c b/src/game_em/convert.c index 32c4b600..086bc7a3 100644 --- a/src/game_em/convert.c +++ b/src/game_em/convert.c @@ -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 */ diff --git a/src/game_em/export.h b/src/game_em/export.h index 065d6214..365cafe8 100644 --- a/src/game_em/export.h +++ b/src/game_em/export.h @@ -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;