summaryrefslogtreecommitdiff
path: root/scene/2d/joints_2d.h
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-02-10 17:39:53 +0100
committerGitHub <noreply@github.com>2021-02-10 17:39:53 +0100
commit1808f1d76d51b67513c0cd864444f20ecf808601 (patch)
tree19bf66787e48cebd86b494846d147db1f163f87c /scene/2d/joints_2d.h
parentf3d15771bf33e68b26058806f9310ac074c56e5c (diff)
parent8b19ffd810a1471ab870b7229047ad2101341330 (diff)
Merge pull request #45852 from reduz/make-servers-truly-thread-safe
Make Servers truly Thread Safe
Diffstat (limited to 'scene/2d/joints_2d.h')
-rw-r--r--scene/2d/joints_2d.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/scene/2d/joints_2d.h b/scene/2d/joints_2d.h
index 887155c6ea..3607a6c176 100644
--- a/scene/2d/joints_2d.h
+++ b/scene/2d/joints_2d.h
@@ -46,6 +46,7 @@ class Joint2D : public Node2D {
real_t bias = 0.0;
bool exclude_from_collision = true;
+ bool configured = false;
String warning;
protected:
@@ -54,10 +55,12 @@ protected:
void _update_joint(bool p_only_free = false);
void _notification(int p_what);
- virtual RID _configure_joint(PhysicsBody2D *body_a, PhysicsBody2D *body_b) = 0;
+ virtual void _configure_joint(RID p_joint, PhysicsBody2D *body_a, PhysicsBody2D *body_b) = 0;
static void _bind_methods();
+ _FORCE_INLINE_ bool is_configured() const { return configured; }
+
public:
virtual String get_configuration_warning() const override;
@@ -75,6 +78,7 @@ public:
RID get_joint() const { return joint; }
Joint2D();
+ ~Joint2D();
};
class PinJoint2D : public Joint2D {
@@ -84,7 +88,7 @@ class PinJoint2D : public Joint2D {
protected:
void _notification(int p_what);
- virtual RID _configure_joint(PhysicsBody2D *body_a, PhysicsBody2D *body_b) override;
+ virtual void _configure_joint(RID p_joint, PhysicsBody2D *body_a, PhysicsBody2D *body_b) override;
static void _bind_methods();
public:
@@ -102,7 +106,7 @@ class GrooveJoint2D : public Joint2D {
protected:
void _notification(int p_what);
- virtual RID _configure_joint(PhysicsBody2D *body_a, PhysicsBody2D *body_b) override;
+ virtual void _configure_joint(RID p_joint, PhysicsBody2D *body_a, PhysicsBody2D *body_b) override;
static void _bind_methods();
public:
@@ -125,7 +129,7 @@ class DampedSpringJoint2D : public Joint2D {
protected:
void _notification(int p_what);
- virtual RID _configure_joint(PhysicsBody2D *body_a, PhysicsBody2D *body_b) override;
+ virtual void _configure_joint(RID p_joint, PhysicsBody2D *body_a, PhysicsBody2D *body_b) override;
static void _bind_methods();
public: