From: Wolfgang Becker Date: Mon, 10 Jul 2006 00:28:12 +0000 (+0000) Subject: Don't report collisions if nothing got hit X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=566efd038ffabaea6cb27cebae27e9ad88b5ab4b;p=supertux.git Don't report collisions if nothing got hit SVN-Revision: 3974 --- 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