summaryrefslogtreecommitdiff
path: root/servers/physics_2d/body_2d_sw.h
diff options
context:
space:
mode:
Diffstat (limited to 'servers/physics_2d/body_2d_sw.h')
-rw-r--r--servers/physics_2d/body_2d_sw.h14
1 files changed, 3 insertions, 11 deletions
diff --git a/servers/physics_2d/body_2d_sw.h b/servers/physics_2d/body_2d_sw.h
index 7fe805b1f9..69184ad484 100644
--- a/servers/physics_2d/body_2d_sw.h
+++ b/servers/physics_2d/body_2d_sw.h
@@ -54,8 +54,6 @@ class Body2DSW : public CollisionObject2DSW {
real_t mass;
real_t bounce;
real_t friction;
- Physics2DServer::CombineMode bounce_combine_mode;
- Physics2DServer::CombineMode friction_combine_mode;
real_t _inv_mass;
real_t _inv_inertia;
@@ -141,7 +139,7 @@ public:
_FORCE_INLINE_ void add_area(Area2DSW *p_area) {
int index = areas.find(AreaCMP(p_area));
if (index > -1) {
- areas[index].refCount += 1;
+ areas.write[index].refCount += 1;
} else {
areas.ordered_insert(AreaCMP(p_area));
}
@@ -150,7 +148,7 @@ public:
_FORCE_INLINE_ void remove_area(Area2DSW *p_area) {
int index = areas.find(AreaCMP(p_area));
if (index > -1) {
- areas[index].refCount -= 1;
+ areas.write[index].refCount -= 1;
if (areas[index].refCount < 1)
areas.remove(index);
}
@@ -274,12 +272,6 @@ public:
_FORCE_INLINE_ real_t get_linear_damp() const { return linear_damp; }
_FORCE_INLINE_ real_t get_angular_damp() const { return angular_damp; }
- void set_combine_mode(Physics2DServer::BodyParameter p_param, Physics2DServer::CombineMode p_mode);
- Physics2DServer::CombineMode get_combine_mode(Physics2DServer::BodyParameter p_param) const;
-
- _FORCE_INLINE_ Physics2DServer::CombineMode get_bounce_combine_mode() const { return bounce_combine_mode; }
- _FORCE_INLINE_ Physics2DServer::CombineMode get_friction_combine_mode() const { return friction_combine_mode; }
-
void integrate_forces(real_t p_step);
void integrate_velocities(real_t p_step);
@@ -311,7 +303,7 @@ void Body2DSW::add_contact(const Vector2 &p_local_pos, const Vector2 &p_local_no
if (c_max == 0)
return;
- Contact *c = &contacts[0];
+ Contact *c = contacts.ptrw();
int idx = -1;