Исправление. Возможно обращение к несуществующему элементу
This commit is contained in:
@@ -746,7 +746,7 @@ func _on_threat_update(th) -> void:
|
|||||||
|
|
||||||
|
|
||||||
func _on_threat_lost(th) -> void:
|
func _on_threat_lost(th) -> void:
|
||||||
var target = get_parent().get_node(str(th.id))
|
var target = get_parent().get_node_or_null(str(th.id))
|
||||||
if target:
|
if target:
|
||||||
target.queue_free()
|
target.queue_free()
|
||||||
|
|
||||||
|
|||||||
@@ -173,4 +173,4 @@
|
|||||||
false,
|
false,
|
||||||
true
|
true
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user