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:
parent
46bd32f3b2
commit
ebe999a93c
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue