1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-31 18:41:20 +00:00

Use RequiredParam/RequiredResult in some high value places

This commit is contained in:
David Snopek
2025-11-27 13:09:16 -06:00
parent 3a97723ff2
commit fc92ce3e7f
79 changed files with 372 additions and 321 deletions

View File

@@ -985,9 +985,10 @@ RID JoltPhysicsServer3D::soft_body_create() {
return rid;
}
void JoltPhysicsServer3D::soft_body_update_rendering_server(RID p_body, PhysicsServer3DRenderingServerHandler *p_rendering_server_handler) {
void JoltPhysicsServer3D::soft_body_update_rendering_server(RID p_body, RequiredParam<PhysicsServer3DRenderingServerHandler> rp_rendering_server_handler) {
JoltSoftBody3D *body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_NULL(body);
EXTRACT_PARAM_OR_FAIL(p_rendering_server_handler, rp_rendering_server_handler);
return body->update_rendering_server(p_rendering_server_handler);
}

View File

@@ -300,7 +300,7 @@ public:
virtual RID soft_body_create() override;
virtual void soft_body_update_rendering_server(RID p_body, PhysicsServer3DRenderingServerHandler *p_rendering_server_handler) override;
virtual void soft_body_update_rendering_server(RID p_body, RequiredParam<PhysicsServer3DRenderingServerHandler> p_rendering_server_handler) override;
virtual void soft_body_set_space(RID p_body, RID p_space) override;
virtual RID soft_body_get_space(RID p_body) const override;

View File

@@ -256,6 +256,6 @@ void JoltPhysicsDirectBodyState3D::integrate_forces() {
set_angular_velocity(angular_velocity);
}
PhysicsDirectSpaceState3D *JoltPhysicsDirectBodyState3D::get_space_state() {
RequiredResult<PhysicsDirectSpaceState3D> JoltPhysicsDirectBodyState3D::get_space_state() {
return body->get_space()->get_direct_state();
}

View File

@@ -115,5 +115,5 @@ public:
virtual void integrate_forces() override;
virtual PhysicsDirectSpaceState3D *get_space_state() override;
virtual RequiredResult<PhysicsDirectSpaceState3D> get_space_state() override;
};