diff options
Diffstat (limited to 'modules/multiplayer/multiplayer_spawner.cpp')
-rw-r--r-- | modules/multiplayer/multiplayer_spawner.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/multiplayer/multiplayer_spawner.cpp b/modules/multiplayer/multiplayer_spawner.cpp index 6c6aa28344..264a2e9c8e 100644 --- a/modules/multiplayer/multiplayer_spawner.cpp +++ b/modules/multiplayer/multiplayer_spawner.cpp @@ -268,7 +268,7 @@ void MultiplayerSpawner::_spawn_notify(ObjectID p_id) { void MultiplayerSpawner::_node_exit(ObjectID p_id) { Node *node = Object::cast_to<Node>(ObjectDB::get_instance(p_id)); - ERR_FAIL_COND(!node); + ERR_FAIL_NULL(node); if (tracked_nodes.has(p_id)) { tracked_nodes.erase(p_id); get_multiplayer()->object_configuration_remove(node, this); @@ -323,10 +323,10 @@ Node *MultiplayerSpawner::spawn(const Variant &p_data) { ERR_FAIL_COND_V_MSG(!spawn_function.is_valid(), nullptr, "Custom spawn requires the 'spawn_function' property to be a valid callable."); Node *parent = get_spawn_node(); - ERR_FAIL_COND_V_MSG(!parent, nullptr, "Cannot find spawn node."); + ERR_FAIL_NULL_V_MSG(parent, nullptr, "Cannot find spawn node."); Node *node = instantiate_custom(p_data); - ERR_FAIL_COND_V_MSG(!node, nullptr, "The 'spawn_function' callable must return a valid node."); + ERR_FAIL_NULL_V_MSG(node, nullptr, "The 'spawn_function' callable must return a valid node."); _track(node, p_data); parent->add_child(node, true); |