From 5d23bb1af12d58efb30d92e65ddd0679393114c6 Mon Sep 17 00:00:00 2001 From: Duncan Brown Date: Sat, 23 Apr 2022 21:03:44 -0400 Subject: [PATCH] fix: avoids brief flickering to current scene during scene transition; can be moved since these were left in place pre-transition overhaul --- .../game/core-scripts/esc/esc_event_manager.gd | 2 +- .../game/core-scripts/esc/esc_room_manager.gd | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/escoria-core/game/core-scripts/esc/esc_event_manager.gd b/addons/escoria-core/game/core-scripts/esc/esc_event_manager.gd index 9490932d..9573967e 100644 --- a/addons/escoria-core/game/core-scripts/esc/esc_event_manager.gd +++ b/addons/escoria-core/game/core-scripts/esc/esc_event_manager.gd @@ -282,7 +282,7 @@ func _on_event_finished(finished_statement: ESCStatement, return_code: int, chan escoria.save_manager.save_enabled = true if return_code == ESCExecution.RC_CANCEL: - return_code = ESCExecution.RC_OK + return_code = ESCExecution.RC_OK _running_events[channel_name] = null _channels_state[channel_name] = true diff --git a/addons/escoria-core/game/core-scripts/esc/esc_room_manager.gd b/addons/escoria-core/game/core-scripts/esc/esc_room_manager.gd index 2c61fa99..66407d38 100644 --- a/addons/escoria-core/game/core-scripts/esc/esc_room_manager.gd +++ b/addons/escoria-core/game/core-scripts/esc/esc_room_manager.gd @@ -234,10 +234,6 @@ func _perform_script_events(room: ESCRoom) -> void: yielded = true - # Hide main and pause menus - escoria.game_scene.hide_main_menu() - escoria.game_scene.unpause_game() - # With the room transitioned out, finish any room prep and run :setup if # it exists. if room.player_scene: @@ -317,6 +313,10 @@ func _perform_script_events(room: ESCRoom) -> void: # making the new room visible. escoria.main.set_scene_finish() + # Hide main and pause menus + escoria.game_scene.hide_main_menu() + escoria.game_scene.unpause_game() + # Maybe this is ok to put in set_scene_finish() above? But it might be a bit # confusing to not see the matching camera.current updates. new_player_camera.make_current()