summaryrefslogtreecommitdiff
path: root/servers/physics_2d
diff options
context:
space:
mode:
authorWilson E. Alvarez <wilson.e.alvarez1@gmail.com>2017-08-21 15:15:36 -0400
committerWilson E. Alvarez <wilson.e.alvarez1@gmail.com>2017-08-21 15:15:55 -0400
commit738d2ab96997faa1e13b91e38cf8a0000d829f70 (patch)
treee33258663017edb924695e68224ba836e5fc9f08 /servers/physics_2d
parent4717d37bfa867d8cdcd4805967324978da6701b7 (diff)
Removed unnecessary assignments
Diffstat (limited to 'servers/physics_2d')
-rw-r--r--servers/physics_2d/joints_2d_sw.cpp6
-rw-r--r--servers/physics_2d/space_2d_sw.cpp7
2 files changed, 6 insertions, 7 deletions
diff --git a/servers/physics_2d/joints_2d_sw.cpp b/servers/physics_2d/joints_2d_sw.cpp
index 449765621e..93091f55cf 100644
--- a/servers/physics_2d/joints_2d_sw.cpp
+++ b/servers/physics_2d/joints_2d_sw.cpp
@@ -408,8 +408,10 @@ bool GrooveJoint2DSW::setup(real_t p_step) {
//joint->bias = cpvclamp(cpvmult(delta, -joint->constraint.biasCoef*dt_inv), joint->constraint.maxBias);
Vector2 delta = (B->get_transform().get_origin() + rB) - (A->get_transform().get_origin() + rA);
- real_t _b = get_bias();
- _b = 0.001;
+
+ // FIXME: We used to do this assignment and then override it with 0.001 right after. Investigate why.
+ //real_t _b = get_bias();
+ real_t _b = 0.001;
gbias = (delta * -(_b == 0 ? space->get_constraint_bias() : _b) * (1.0 / p_step)).clamped(get_max_bias());
// apply accumulated impulse
diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp
index 29f879d8e9..718669988c 100644
--- a/servers/physics_2d/space_2d_sw.cpp
+++ b/servers/physics_2d/space_2d_sw.cpp
@@ -532,11 +532,8 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
cbk.amount = 0;
cbk.ptr = sr;
- CollisionSolver2DSW::CallbackResult cbkres = NULL;
-
- Physics2DServerSW::CollCbkData *cbkptr = NULL;
- cbkptr = &cbk;
- cbkres = Physics2DServerSW::_shape_col_cbk;
+ Physics2DServerSW::CollCbkData *cbkptr = &cbk;
+ CollisionSolver2DSW::CallbackResult cbkres = Physics2DServerSW::_shape_col_cbk;
bool collided = false;