summaryrefslogtreecommitdiff
path: root/servers/physics_2d
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2016-07-08 00:32:28 +0200
committerRémi Verschelde <rverschelde@gmail.com>2016-07-08 16:47:55 +0200
commitf40f360a2c4ca8e6f2a651dbcca3ae82e2abe7a1 (patch)
treeef86e39ca4ee986c5ca2888dc96cdfa145a6c2ce /servers/physics_2d
parentd8c31e0e7480906ccf230892b090e3c3cbe1b271 (diff)
Remove unused variables (fourth pass) + dead code
Also fix a potential regression from 3fcb9b1ec179b99d979d4cfea9b5e3c80e4a3e33.
Diffstat (limited to 'servers/physics_2d')
-rw-r--r--servers/physics_2d/shape_2d_sw.cpp3
-rw-r--r--servers/physics_2d/space_2d_sw.cpp4
2 files changed, 0 insertions, 7 deletions
diff --git a/servers/physics_2d/shape_2d_sw.cpp b/servers/physics_2d/shape_2d_sw.cpp
index 8b583dd3c6..9291aa6c17 100644
--- a/servers/physics_2d/shape_2d_sw.cpp
+++ b/servers/physics_2d/shape_2d_sw.cpp
@@ -243,7 +243,6 @@ bool SegmentShape2DSW::intersect_segment(const Vector2& p_begin,const Vector2& p
if (!Geometry::segment_intersects_segment_2d(p_begin,p_end,a,b,&r_point))
return false;
- Vector2 d = p_end-p_begin;
if (n.dot(p_begin) > n.dot(a)) {
r_normal=n;
} else {
@@ -825,7 +824,6 @@ bool ConcavePolygonShape2DSW::intersect_segment(const Vector2& p_begin,const Vec
const Segment *segmentptr=&segments[0];
const Vector2 *pointptr=&points[0];
const BVH *bvhptr = &bvh[0];
- int pos=bvh.size()-1;
stack[0]=0;
@@ -1088,7 +1086,6 @@ void ConcavePolygonShape2DSW::cull(const Rect2& p_local_aabb,Callback p_callback
const Segment *segmentptr=&segments[0];
const Vector2 *pointptr=&points[0];
const BVH *bvhptr = &bvh[0];
- int pos=bvh.size()-1;
stack[0]=0;
diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp
index ddef5fc86b..5fde6f567b 100644
--- a/servers/physics_2d/space_2d_sw.cpp
+++ b/servers/physics_2d/space_2d_sw.cpp
@@ -200,7 +200,6 @@ int Physics2DDirectSpaceStateSW::intersect_shape(const RID& p_shape, const Matri
int amount = space->broadphase->cull_aabb(aabb,space->intersection_query_results,p_result_max,space->intersection_query_subindex_results);
- bool collided=false;
int cc=0;
for(int i=0;i<amount;i++) {
@@ -307,7 +306,6 @@ bool Physics2DDirectSpaceStateSW::cast_motion(const RID& p_shape, const Matrix32
for(int i=0;i<8;i++) { //steps should be customizable..
- Matrix32 xfa = p_xform;
float ofs = (low+hi)*0.5;
Vector2 sep=mnormal; //important optimization for this to work fast enough
@@ -377,7 +375,6 @@ bool Physics2DDirectSpaceStateSW::collide_shape(RID p_shape, const Matrix32& p_s
int amount = space->broadphase->cull_aabb(aabb,space->intersection_query_results,Space2DSW::INTERSECTION_QUERY_MAX,space->intersection_query_subindex_results);
bool collided=false;
- int cc=0;
r_result_count=0;
Physics2DServerSW::CollCbkData cbk;
@@ -768,7 +765,6 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body,const Vector2&p_motion,float p
for(int i=0;i<8;i++) { //steps should be customizable..
- //Matrix32 xfa = p_xform;
float ofs = (low+hi)*0.5;
Vector2 sep=mnormal; //important optimization for this to work fast enough