From 566efd038ffabaea6cb27cebae27e9ad88b5ab4b Mon Sep 17 00:00:00 2001 From: Wolfgang Becker Date: Mon, 10 Jul 2006 00:28:12 +0000 Subject: [PATCH] Don't report collisions if nothing got hit SVN-Revision: 3974 --- src/sector.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/sector.cpp b/src/sector.cpp index 6a152e6b0..97bb34998 100644 --- a/src/sector.cpp +++ b/src/sector.cpp @@ -1010,7 +1010,7 @@ Sector::handle_collisions() if(constraints.hit.top || constraints.hit.bottom) { constraints.hit.left = false; constraints.hit.right = false; - moving_object->collision_solid(constraints.hit); + moving_object->collision_solid(constraints.hit); } } @@ -1042,7 +1042,11 @@ Sector::handle_collisions() } if(constraints.has_constraints()) { - moving_object->collision_solid(constraints.hit); + if( constraints.hit.left || constraints.hit.right + || constraints.hit.top || constraints.hit.bottom + || constraints.hit.crush ) + moving_object->collision_solid(constraints.hit); + //else printf("Wayne?\n"); } // an extra pass to make sure we're not crushed horizontally -- 2.11.0