diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2016-07-08 00:32:28 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2016-07-08 16:47:55 +0200 |
commit | f40f360a2c4ca8e6f2a651dbcca3ae82e2abe7a1 (patch) | |
tree | ef86e39ca4ee986c5ca2888dc96cdfa145a6c2ce /servers/physics | |
parent | d8c31e0e7480906ccf230892b090e3c3cbe1b271 (diff) |
Remove unused variables (fourth pass) + dead code
Also fix a potential regression from 3fcb9b1ec179b99d979d4cfea9b5e3c80e4a3e33.
Diffstat (limited to 'servers/physics')
-rw-r--r-- | servers/physics/body_pair_sw.cpp | 4 | ||||
-rw-r--r-- | servers/physics/collision_solver_sat.cpp | 1 | ||||
-rw-r--r-- | servers/physics/shape_sw.cpp | 4 | ||||
-rw-r--r-- | servers/physics/space_sw.cpp | 4 |
4 files changed, 0 insertions, 13 deletions
diff --git a/servers/physics/body_pair_sw.cpp b/servers/physics/body_pair_sw.cpp index 40e906c36c..3202e52abb 100644 --- a/servers/physics/body_pair_sw.cpp +++ b/servers/physics/body_pair_sw.cpp @@ -307,10 +307,6 @@ bool BodyPairSW::setup(float p_step) { } #endif - - int gather_A = A->can_report_contacts(); - int gather_B = B->can_report_contacts(); - c.rA = global_A; c.rB = global_B-offset_B; diff --git a/servers/physics/collision_solver_sat.cpp b/servers/physics/collision_solver_sat.cpp index 8789663f63..3e7719e5eb 100644 --- a/servers/physics/collision_solver_sat.cpp +++ b/servers/physics/collision_solver_sat.cpp @@ -1230,7 +1230,6 @@ static void _collision_capsule_convex_polygon(const ShapeSW *p_a,const Transform const Geometry::MeshData::Edge *edges = mesh.edges.ptr(); int edge_count = mesh.edges.size(); const Vector3 *vertices = mesh.vertices.ptr(); - int vertex_count = mesh.vertices.size(); // faces of B for (int i=0;i<face_count;i++) { diff --git a/servers/physics/shape_sw.cpp b/servers/physics/shape_sw.cpp index 5923f89120..1d4914c945 100644 --- a/servers/physics/shape_sw.cpp +++ b/servers/physics/shape_sw.cpp @@ -766,7 +766,6 @@ bool ConvexPolygonShapeSW::intersect_segment(const Vector3& p_begin,const Vector int fc = mesh.faces.size(); const Vector3 *vertices = mesh.vertices.ptr(); - int vc = mesh.vertices.size(); Vector3 n = p_end-p_begin; float min = 1e20; @@ -873,14 +872,11 @@ void FaceShapeSW::project_range(const Vector3& p_normal, const Transform& p_tran Vector3 FaceShapeSW::get_support(const Vector3& p_normal) const { - Vector3 n=p_normal; - int vert_support_idx=-1; float support_max; for (int i=0;i<3;i++) { - //float d=n.dot(vertex[i]); float d=p_normal.dot(vertex[i]); if (i==0 || d > support_max) { diff --git a/servers/physics/space_sw.cpp b/servers/physics/space_sw.cpp index 1e6f42aa02..7077146420 100644 --- a/servers/physics/space_sw.cpp +++ b/servers/physics/space_sw.cpp @@ -150,7 +150,6 @@ int PhysicsDirectSpaceStateSW::intersect_shape(const RID& p_shape, const Transfo int amount = space->broadphase->cull_aabb(aabb,space->intersection_query_results,SpaceSW::INTERSECTION_QUERY_MAX,space->intersection_query_subindex_results); - bool collided=false; int cc=0; //Transform ai = p_xform.affine_inverse(); @@ -269,7 +268,6 @@ bool PhysicsDirectSpaceStateSW::cast_motion(const RID& p_shape, const Transform& for(int i=0;i<8;i++) { //steps should be customizable.. - Transform xfa = p_xform; float ofs = (low+hi)*0.5; Vector3 sep=mnormal; //important optimization for this to work fast enough @@ -337,7 +335,6 @@ bool PhysicsDirectSpaceStateSW::collide_shape(RID p_shape, const Transform& p_sh int amount = space->broadphase->cull_aabb(aabb,space->intersection_query_results,SpaceSW::INTERSECTION_QUERY_MAX,space->intersection_query_subindex_results); bool collided=false; - int cc=0; r_result_count=0; PhysicsServerSW::CollCbkData cbk; @@ -457,7 +454,6 @@ bool PhysicsDirectSpaceStateSW::rest_info(RID p_shape, const Transform& p_shape_ if (rcd.best_object->get_type()==CollisionObjectSW::TYPE_BODY) { const BodySW *body = static_cast<const BodySW*>(rcd.best_object); - Vector3 rel_vec = r_info->point-body->get_transform().get_origin(); r_info->linear_velocity = body->get_linear_velocity() + (body->get_angular_velocity()).cross(body->get_transform().origin-rcd.best_contact);// * mPos); |