diff options
Diffstat (limited to 'scene/3d/soft_body.cpp')
-rw-r--r-- | scene/3d/soft_body.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/scene/3d/soft_body.cpp b/scene/3d/soft_body.cpp index 386e127f8b..6c3949a0a8 100644 --- a/scene/3d/soft_body.cpp +++ b/scene/3d/soft_body.cpp @@ -577,20 +577,14 @@ Array SoftBody::get_collision_exceptions() { void SoftBody::add_collision_exception_with(Node *p_node) { ERR_FAIL_NULL(p_node); CollisionObject *collision_object = Object::cast_to<CollisionObject>(p_node); - if (!collision_object) { - ERR_EXPLAIN("Collision exception only works between two CollisionObject"); - } - ERR_FAIL_COND(!collision_object); + ERR_FAIL_COND_MSG(!collision_object, "Collision exception only works between two CollisionObject."); PhysicsServer::get_singleton()->soft_body_add_collision_exception(physics_rid, collision_object->get_rid()); } void SoftBody::remove_collision_exception_with(Node *p_node) { ERR_FAIL_NULL(p_node); CollisionObject *collision_object = Object::cast_to<CollisionObject>(p_node); - if (!collision_object) { - ERR_EXPLAIN("Collision exception only works between two CollisionObject"); - } - ERR_FAIL_COND(!collision_object); + ERR_FAIL_COND_MSG(!collision_object, "Collision exception only works between two CollisionObject."); PhysicsServer::get_singleton()->soft_body_remove_collision_exception(physics_rid, collision_object->get_rid()); } |