fix: avoids crashes in case of input when room is run directly and interrupted; may look at updating room manager in the future

This commit is contained in:
Duncan Brown
2022-05-10 14:35:48 -04:00
committed by Julian Murgia
parent 9e247a9218
commit ff178541fc
4 changed files with 5 additions and 4 deletions

View File

@@ -72,4 +72,5 @@ func run(command_params: Array) -> int:
# Function called when the command is interrupted.
func interrupt():
walking_object_node.stop_walking_now()
if walking_object_node != null:
walking_object_node.stop_walking_now()

View File

@@ -73,5 +73,5 @@ func run(command_params: Array) -> int:
# Function called when the command is interrupted.
func interrupt():
if not walking_object_node is ESCPlayer:
if walking_object_node != null and not walking_object_node is ESCPlayer:
walking_object_node.stop_walking_now()

View File

@@ -62,5 +62,5 @@ func run(command_params: Array) -> int:
# Function called when the command is interrupted.
func interrupt():
if not walking_object_node is ESCPlayer:
if walking_object_node != null and not walking_object_node is ESCPlayer:
walking_object_node.stop_walking_now()

View File

@@ -66,5 +66,5 @@ func run(command_params: Array) -> int:
# Function called when the command is interrupted.
func interrupt():
if not walking_object_node is ESCPlayer:
if walking_object_node != null and not walking_object_node is ESCPlayer:
walking_object_node.stop_walking_now()