projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5b6a79d
)
Don't report collisions if nothing got hit
author
Wolfgang Becker
<uafr@gmx.de>
Mon, 10 Jul 2006 00:28:12 +0000
(
00:28
+0000)
committer
Wolfgang Becker
<uafr@gmx.de>
Mon, 10 Jul 2006 00:28:12 +0000
(
00:28
+0000)
SVN-Revision: 3974
src/sector.cpp
patch
|
blob
|
history
diff --git
a/src/sector.cpp
b/src/sector.cpp
index
6a152e6
..
97bb349
100644
(file)
--- 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;
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()) {
}
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
}
// an extra pass to make sure we're not crushed horizontally