projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a4e26a7
)
hack to make movingobject vs. static also call the collides function of the moving...
author
Matthias Braun
<matze@braunis.de>
Sat, 26 May 2007 15:23:22 +0000
(15:23 +0000)
committer
Matthias Braun
<matze@braunis.de>
Sat, 26 May 2007 15:23:22 +0000
(15:23 +0000)
SVN-Revision: 5023
src/sector.cpp
patch
|
blob
|
history
diff --git
a/src/sector.cpp
b/src/sector.cpp
index
29a0aa1
..
88b40cd
100644
(file)
--- 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<MovingObject*> (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();