fix: restores state on returning; for some reason, previously state was modified but never restored.
This commit is contained in:
committed by
Julian Murgia
parent
328e5efdd9
commit
9398ce96c3
@@ -80,7 +80,11 @@ func run():
|
||||
self,
|
||||
"Starting dialog."
|
||||
)
|
||||
|
||||
# Since we're changing state, we need to remember and reset it once we're done
|
||||
var previous_state = escoria.current_state
|
||||
escoria.current_state = escoria.GAME_STATE.DIALOG
|
||||
|
||||
if !escoria.dialog_player:
|
||||
escoria.dialog_player = escoria.main.current_scene.get_node(
|
||||
"game/ui/dialog_layer/dialog_player"
|
||||
@@ -103,4 +107,6 @@ func run():
|
||||
if rc != ESCExecution.RC_CANCEL:
|
||||
return self.run()
|
||||
|
||||
escoria.current_state = previous_state
|
||||
|
||||
return rc
|
||||
|
||||
Reference in New Issue
Block a user