From b043123f5ece1879b3f884658d002f1d7726f212 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Sat, 26 May 2007 15:23:22 +0000 Subject: [PATCH] hack to make movingobject vs. static also call the collides function of the moving object SVN-Revision: 5023 --- src/sector.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sector.cpp b/src/sector.cpp index 29a0aa162..88b40cd1b 100644 --- a/src/sector.cpp +++ b/src/sector.cpp @@ -889,9 +889,12 @@ void check_collisions(collision::Constraints* constraints, if(!collision::intersects(r1, r2)) return; + MovingObject *moving_object = dynamic_cast (object); CollisionHit dummy; if(other != NULL && !other->collides(*object, dummy)) return; + if(moving_object != NULL && !moving_object->collides(*other, dummy)) + return; // calculate intersection float itop = r1.get_bottom() - r2.get_top(); -- 2.11.0