From b7b01c5770ff834f6bdcce3de4c2be0d58937b43 Mon Sep 17 00:00:00 2001 From: Julian Murgia Date: Tue, 26 Oct 2021 21:30:20 +0200 Subject: [PATCH] Simplified overcomplex test (#423) --- .../game/core-scripts/esc/commands/change_scene.gd | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/escoria-core/game/core-scripts/esc/commands/change_scene.gd b/addons/escoria-core/game/core-scripts/esc/commands/change_scene.gd index 1a882b78..ae5ec694 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/change_scene.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/change_scene.gd @@ -96,10 +96,10 @@ func run(command_params: Array) -> int: room_scene.game = escoria.game_scene escoria.main.set_scene(room_scene) - if not "esc_script" in room_scene or not room_scene.esc_script \ - or not command_params[2] and !command_params[1]: - escoria.main.scene_transition.transition() - yield(escoria.main.scene_transition, "transition_done") + # If automatic transition is not disabled, play the transition + if not command_params[1]: + escoria.main.scene_transition.transition() + yield(escoria.main.scene_transition, "transition_done") # Clear queued resources escoria.resource_cache.clear()