Added destructors to physics bodies to hopefully fix failing compile on some platforms.

This commit is contained in:
Relintai 2022-03-17 20:00:20 +01:00
parent 3965d70ac5
commit 44bd2e0119
2 changed files with 10 additions and 0 deletions

View File

@ -105,6 +105,10 @@ PhysicsBody::PhysicsBody(PhysicsServer::BodyMode p_mode) :
CollisionObject(RID_PRIME(PhysicsServer::get_singleton()->body_create(p_mode)), false) { CollisionObject(RID_PRIME(PhysicsServer::get_singleton()->body_create(p_mode)), false) {
} }
PhysicsBody::~PhysicsBody() {
}
#ifndef DISABLE_DEPRECATED #ifndef DISABLE_DEPRECATED
void StaticBody::set_friction(real_t p_friction) { void StaticBody::set_friction(real_t p_friction) {
if (p_friction == 1.0 && physics_material_override.is_null()) { // default value, don't create an override for that if (p_friction == 1.0 && physics_material_override.is_null()) { // default value, don't create an override for that
@ -1612,6 +1616,10 @@ KinematicCollision::KinematicCollision() {
owner = nullptr; owner = nullptr;
} }
KinematicCollision::~KinematicCollision() {
}
/////////////////////////////////////// ///////////////////////////////////////
bool PhysicalBone::JointData::_set(const StringName &p_name, const Variant &p_value, RID j) { bool PhysicalBone::JointData::_set(const StringName &p_name, const Variant &p_value, RID j) {

View File

@ -49,6 +49,7 @@ protected:
static void _bind_methods(); static void _bind_methods();
void _notification(int p_what); void _notification(int p_what);
PhysicsBody(PhysicsServer::BodyMode p_mode); PhysicsBody(PhysicsServer::BodyMode p_mode);
~PhysicsBody();
public: public:
virtual Vector3 get_linear_velocity() const; virtual Vector3 get_linear_velocity() const;
@ -379,6 +380,7 @@ public:
Variant get_collider_metadata() const; Variant get_collider_metadata() const;
KinematicCollision(); KinematicCollision();
~KinematicCollision();
}; };
class PhysicalBone : public PhysicsBody { class PhysicalBone : public PhysicsBody {