From: Matthias Braun Date: Sat, 26 May 2007 15:23:22 +0000 (+0000) Subject: hack to make movingobject vs. static also call the collides function of the moving... X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=b043123f5ece1879b3f884658d002f1d7726f212;p=supertux.git hack to make movingobject vs. static also call the collides function of the moving object SVN-Revision: 5023 --- 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();