Repository: godotengine/godot
File: modules/jolt_physics/jolt_physics_server_3d.cpp (C++)

Code before:
void JoltPhysicsServer3D::area_set_space(RID p_area, RID p_space) {
	JoltArea3D *area = area_owner.get_or_null(p_area);
	ERR_FAIL_NULL(area);

	JoltSpace3D *space = nullptr;

	if (p_space.is_valid()) {
		space = space_owner.get_or_null(p_space);
		ERR_FAIL_NULL(space);
	}

	area->set_space(space);
}

void JoltPhysicsServer3D::soft_body_apply_point_impulse(RID p_body, int p_point_index, const Vector3 &p_impulse) {
	JoltSoftBody3D *body = soft_body_owner.get_or_null(p_body);
	ERR_FAIL_NULL(body);

	body->apply_vertex_impulse(p_point_index, p_impulse);
}

void JoltPhysicsServer3D::soft_body_apply_point_force(RID p_body, int p_node_index, const Vector3 &p_force) {
	JoltSoftBody3D *body = soft_body_owner.get_or_null(p_body);
	ERR_FAIL_NULL(body);

	body->apply_vertex_force(p_node_index, p_force);
}

void JoltPhysicsServer3D::soft_body_apply_central_impulse(RID p_body, const Vector3 &p_impulse) {
	JoltSoftBody3D *body = soft_body_owner.get_or_null(p_body);
	ERR_FAIL_NULL(body);

	body->apply_central_impulse(p_impulse);
}

void JoltPhysicsServer3D::soft_body_apply_central_force(RID p_body, const Vector3 &p_force) {
	JoltSoftBody3D *body = soft_body_owner.get_or_null(p_body);
	ERR_FAIL_NULL(body);

	body->apply_central_force(p_force);
}

RID JoltPhysicsServer3D::area_get_space(RID p_area) const {
	const JoltArea3D *area = area_owner.get_or_null(p_area);
	ERR_FAIL_NULL_V(area, RID());

	const JoltSpace3D *space = area->get_space();

	if (space == nullptr) {
		return RID();
	}

Review comment (suggestion):
```suggestion
	body->apply_vertex_force(p_point_index, p_force);
```

Code after:
void JoltPhysicsServer3D::area_set_space(RID p_area, RID p_space) {
	JoltArea3D *area = area_owner.get_or_null(p_area);
	ERR_FAIL_NULL(area);

	JoltSpace3D *space = nullptr;

	if (p_space.is_valid()) {
		space = space_owner.get_or_null(p_space);
		ERR_FAIL_NULL(space);
	}

	area->set_space(space);
}

void JoltPhysicsServer3D::soft_body_apply_point_impulse(RID p_body, int p_point_index, const Vector3 &p_impulse) {
	JoltSoftBody3D *body = soft_body_owner.get_or_null(p_body);
	ERR_FAIL_NULL(body);

	body->apply_vertex_impulse(p_point_index, p_impulse);
}

void JoltPhysicsServer3D::soft_body_apply_point_force(RID p_body, int p_point_index, const Vector3 &p_force) {
	JoltSoftBody3D *body = soft_body_owner.get_or_null(p_body);
	ERR_FAIL_NULL(body);

	body->apply_vertex_force(p_point_index, p_force);
}

void JoltPhysicsServer3D::soft_body_apply_central_impulse(RID p_body, const Vector3 &p_impulse) {
	JoltSoftBody3D *body = soft_body_owner.get_or_null(p_body);
	ERR_FAIL_NULL(body);

	body->apply_central_impulse(p_impulse);
}

void JoltPhysicsServer3D::soft_body_apply_central_force(RID p_body, const Vector3 &p_force) {
	JoltSoftBody3D *body = soft_body_owner.get_or_null(p_body);
	ERR_FAIL_NULL(body);

	body->apply_central_force(p_force);
}

RID JoltPhysicsServer3D::area_get_space(RID p_area) const {
	const JoltArea3D *area = area_owner.get_or_null(p_area);
	ERR_FAIL_NULL_V(area, RID());

	const JoltSpace3D *space = area->get_space();

	if (space == nullptr) {
		return RID();
	}