fix the player jump double-up issue, make sure compound states do not enter a child state twice if they are the default (fixes #119)

This commit is contained in:
Haze Weathers 2023-06-18 19:50:37 -04:00
parent 46bd32f3b2
commit ebe999a93c

View file

@ -56,6 +56,9 @@ func _handle_transition(transition: Transition, source: State) -> void:
push_error("the target state: %s of transition from state: %s is not a state" % [str(transition.to), source.name])
return
if target.active:
return
# if direct child, just switch active state
if target in get_children():
# deactivate current state