Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable

This commit is contained in:
A Thousand Ships
2023-09-28 11:40:18 +02:00
parent 6916349697
commit f18aa00e85
45 changed files with 85 additions and 85 deletions

View File

@ -194,7 +194,7 @@ Variant GodotArea2D::get_param(PhysicsServer2D::AreaParameter p_param) const {
}
void GodotArea2D::_queue_monitor_update() {
ERR_FAIL_COND(!get_space());
ERR_FAIL_NULL(get_space());
if (!monitor_query_list.in_list()) {
get_space()->area_add_to_monitor_query_list(&monitor_query_list);

View File

@ -422,7 +422,7 @@ void GodotBody2D::integrate_forces(real_t p_step) {
return;
}
ERR_FAIL_COND(!get_space());
ERR_FAIL_NULL(get_space());
int ac = areas.size();

View File

@ -994,7 +994,7 @@ void GodotPhysicsServer2D::body_set_pickable(RID p_body, bool p_pickable) {
bool GodotPhysicsServer2D::body_test_motion(RID p_body, const MotionParameters &p_parameters, MotionResult *r_result) {
GodotBody2D *body = body_owner.get_or_null(p_body);
ERR_FAIL_NULL_V(body, false);
ERR_FAIL_COND_V(!body->get_space(), false);
ERR_FAIL_NULL_V(body->get_space(), false);
ERR_FAIL_COND_V(body->get_space()->is_locked(), false);
_update_shapes();