fix: animations doesnt have a speaks parameter when it is null

This commit is contained in:
Balloonpopper
2022-02-19 14:08:29 +11:00
parent 4d350056ab
commit 166414098a

View File

@@ -453,7 +453,7 @@ func turn_to(object: Node, wait: float = 0.0):
# Play the talking animation
func start_talking():
# Only start the speaking animation if we actually have them setup
if animations.speaks != null \
if animations != null \
and animations.speaks.size() > 0 \
and get_animation_player() \
and _movable.last_dir >= 0 \
@@ -467,7 +467,7 @@ func start_talking():
# Stop playing the talking animation
func stop_talking():
if animations.speaks != null \
if animations != null \
and animations.speaks.size() > 0 \
and get_animation_player() \
and _movable.last_dir >= 0 \