mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Use RequiredParam/RequiredResult in some high value places
This commit is contained in:
@@ -244,7 +244,7 @@ Vector3 GodotPhysicsDirectBodyState3D::get_contact_collider_velocity_at_position
|
||||
return body->contacts[p_contact_idx].collider_velocity_at_pos;
|
||||
}
|
||||
|
||||
PhysicsDirectSpaceState3D *GodotPhysicsDirectBodyState3D::get_space_state() {
|
||||
RequiredResult<PhysicsDirectSpaceState3D> GodotPhysicsDirectBodyState3D::get_space_state() {
|
||||
return body->get_space()->get_direct_state();
|
||||
}
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ public:
|
||||
virtual int get_contact_collider_shape(int p_contact_idx) const override;
|
||||
virtual Vector3 get_contact_collider_velocity_at_position(int p_contact_idx) const override;
|
||||
|
||||
virtual PhysicsDirectSpaceState3D *get_space_state() override;
|
||||
virtual RequiredResult<PhysicsDirectSpaceState3D> get_space_state() override;
|
||||
|
||||
virtual real_t get_step() const override;
|
||||
};
|
||||
|
||||
@@ -976,9 +976,10 @@ RID GodotPhysicsServer3D::soft_body_create() {
|
||||
return rid;
|
||||
}
|
||||
|
||||
void GodotPhysicsServer3D::soft_body_update_rendering_server(RID p_body, PhysicsServer3DRenderingServerHandler *p_rendering_server_handler) {
|
||||
void GodotPhysicsServer3D::soft_body_update_rendering_server(RID p_body, RequiredParam<PhysicsServer3DRenderingServerHandler> rp_rendering_server_handler) {
|
||||
GodotSoftBody3D *soft_body = soft_body_owner.get_or_null(p_body);
|
||||
ERR_FAIL_NULL(soft_body);
|
||||
EXTRACT_PARAM_OR_FAIL(p_rendering_server_handler, rp_rendering_server_handler);
|
||||
|
||||
soft_body->update_rendering_server(p_rendering_server_handler);
|
||||
}
|
||||
|
||||
@@ -263,7 +263,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;
|
||||
|
||||
Reference in New Issue
Block a user