From bf673ce058cb52c607b0763b876f396ff409f229 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Thom=C3=A4?= Date: Wed, 17 Apr 2024 17:57:05 +0200 Subject: [PATCH] fix: take first matching transition on state enter rather than last when all transitions have a delay --- addons/godot_state_charts/state_chart_state.gd | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/godot_state_charts/state_chart_state.gd b/addons/godot_state_charts/state_chart_state.gd index 72110af..90a71f8 100644 --- a/addons/godot_state_charts/state_chart_state.gd +++ b/addons/godot_state_charts/state_chart_state.gd @@ -112,6 +112,7 @@ func _state_enter(expect_transition:bool = false): if not transition.has_event and transition.evaluate_guard(): # first match wins _run_transition(transition) + break ## Called when the state is exited. func _state_exit():