Adds a small fix on walking interruption to avoid freed reference
This commit is contained in:
committed by
Duncan Brown
parent
881ad581bc
commit
7c00f1dd37
@@ -71,5 +71,6 @@ func run(command_params: Array) -> int:
|
|||||||
|
|
||||||
# Function called when the command is interrupted.
|
# Function called when the command is interrupted.
|
||||||
func interrupt():
|
func interrupt():
|
||||||
if walking_object_node != null and not walking_object_node is ESCPlayer:
|
if walking_object_node != null and is_instance_valid(walking_object_node) \
|
||||||
|
and not walking_object_node is ESCPlayer:
|
||||||
walking_object_node.stop_walking_now()
|
walking_object_node.stop_walking_now()
|
||||||
|
|||||||
Reference in New Issue
Block a user