mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 07:53:26 +00:00
Merge pull request #110805 from lawnjelly/fix_ancestry_construct
Fix ancestry constructors
This commit is contained in:
commit
3d91a48298
3 changed files with 2 additions and 8 deletions
|
@ -713,6 +713,7 @@ CollisionObject3D::CollisionObject3D(RID p_rid, bool p_area) {
|
|||
rid = p_rid;
|
||||
area = p_area;
|
||||
set_notify_transform(true);
|
||||
_define_ancestry(AncestralClass::COLLISION_OBJECT_3D);
|
||||
|
||||
if (p_area) {
|
||||
PhysicsServer3D::get_singleton()->area_attach_object_instance_id(rid, get_instance_id());
|
||||
|
@ -755,8 +756,6 @@ CollisionObject3D::CollisionObject3D() {
|
|||
}
|
||||
|
||||
CollisionObject3D::~CollisionObject3D() {
|
||||
_define_ancestry(AncestralClass::COLLISION_OBJECT_3D);
|
||||
|
||||
ERR_FAIL_NULL(PhysicsServer3D::get_singleton());
|
||||
PhysicsServer3D::get_singleton()->free(rid);
|
||||
}
|
||||
|
|
|
@ -53,6 +53,7 @@ void PhysicsBody3D::_bind_methods() {
|
|||
|
||||
PhysicsBody3D::PhysicsBody3D(PhysicsServer3D::BodyMode p_mode) :
|
||||
CollisionObject3D(PhysicsServer3D::get_singleton()->body_create(), false) {
|
||||
_define_ancestry(AncestralClass::PHYSICS_BODY_3D);
|
||||
set_body_mode(p_mode);
|
||||
}
|
||||
|
||||
|
@ -220,10 +221,6 @@ PackedStringArray PhysicsBody3D::get_configuration_warnings() const {
|
|||
return warnings;
|
||||
}
|
||||
|
||||
PhysicsBody3D::PhysicsBody3D() {
|
||||
_define_ancestry(AncestralClass::PHYSICS_BODY_3D);
|
||||
}
|
||||
|
||||
///////////////////////////////////////
|
||||
|
||||
//so, if you pass 45 as limit, avoid numerical precision errors when angle is 45.
|
||||
|
|
|
@ -67,6 +67,4 @@ public:
|
|||
TypedArray<PhysicsBody3D> get_collision_exceptions();
|
||||
void add_collision_exception_with(Node *p_node); //must be physicsbody
|
||||
void remove_collision_exception_with(Node *p_node);
|
||||
|
||||
PhysicsBody3D();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue