if (!player->is_dropping)
player->was_dropping = FALSE;
}
+
+ static struct MouseActionInfo mouse_action_last = { 0 };
+ struct MouseActionInfo mouse_action = player->effective_mouse_action;
+ boolean new_released = (!mouse_action.button && mouse_action_last.button);
+
+ if (new_released)
+ CheckSaveEngineSnapshotToList();
+
+ mouse_action_last = mouse_action;
}
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->is_dropping_pressed)
+ !player->is_dropping_pressed &&
+ !player->effective_mouse_action.button)
TapeTogglePause(TAPE_TOGGLE_AUTOMATIC);
}
CheckTriggeredElementChangeByPlayer(x, y, element, CE_PLAYER_DIGS_X,
player->index_bit, dig_side);
+ // if digging triggered player relocation, finish digging tile
+ if (mode == DF_DIG && (player->jx != jx || player->jy != jy))
+ setFieldForSnapping(x, y, element, move_direction);
+
if (mode == DF_SNAP)
{
if (level.block_snap_field)
PlayLevelSoundElementAction(x, y, element, ACTION_COLLECTING);
if (is_player)
+ {
CheckTriggeredElementChangeByPlayer(x, y, element, CE_PLAYER_COLLECTS_X,
player->index_bit, dig_side);
+ // if collecting triggered player relocation, finish collecting tile
+ if (mode == DF_DIG && (player->jx != jx || player->jy != jy))
+ setFieldForSnapping(x, y, element, move_direction);
+ }
+
if (mode == DF_SNAP)
{
if (level.block_snap_field)