fix for bad hit structure
authorMatthias Braun <matze@braunis.de>
Mon, 10 Jul 2006 15:34:40 +0000 (15:34 +0000)
committerMatthias Braun <matze@braunis.de>
Mon, 10 Jul 2006 15:34:40 +0000 (15:34 +0000)
SVN-Revision: 3978

src/sector.cpp

index 97bb349..f488ace 100644 (file)
@@ -925,6 +925,8 @@ Sector::collision_object(MovingObject* object1, MovingObject* object2) const
     get_hit_normal(r1, r2, hit, normal);
 
     HitResponse response1 = object1->collision(*object2, hit);
+    std::swap(hit.left, hit.right);
+    std::swap(hit.top, hit.bottom);
     HitResponse response2 = object2->collision(*object1, hit);
     if(response1 == CONTINUE || response2 == CONTINUE) {
       normal *= (0.5 + DELTA);