Also need this here.

This commit is contained in:
Duncan Brown
2022-02-05 13:08:20 -05:00
parent 31b57505b5
commit 9d16122d1a

View File

@@ -466,9 +466,10 @@ func start_talking():
# Stop playing the talking animation
func stop_talking():
if get_animation_player() and \
_movable.last_dir >= 0 and \
_movable.last_dir <= animations.idles.size():
if animations.speaks.size() > 0 \
and get_animation_player() \
and _movable.last_dir >= 0 \
and _movable.last_dir < animations.speaks.size():
if get_animation_player().is_playing():
get_animation_player().stop()
get_animation_player().play(