projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4a54087
)
improve unisolid tile handling
author
Matthias Braun
<matze@braunis.de>
Thu, 5 May 2005 16:22:25 +0000
(16:22 +0000)
committer
Matthias Braun
<matze@braunis.de>
Thu, 5 May 2005 16:22:25 +0000
(16:22 +0000)
SVN-Revision: 2409
src/sector.cpp
patch
|
blob
|
history
diff --git
a/src/sector.cpp
b/src/sector.cpp
index
1d14695
..
46927eb
100644
(file)
--- a/
src/sector.cpp
+++ b/
src/sector.cpp
@@
-598,11
+598,15
@@
Sector::collision_tilemap(MovingObject* object, int depth)
const Tile* tile = solids->get_tile(x, y);
if(!tile)
continue;
const Tile* tile = solids->get_tile(x, y);
if(!tile)
continue;
+ // skip non-solid tiles
if(!(tile->getAttributes() & Tile::SOLID))
continue;
if(!(tile->getAttributes() & Tile::SOLID))
continue;
- if(tile->getAttributes() & Tile::UNISOLID
- && (object->movement.y < 0 || dest.p2.y > y*32))
- continue;
+ // only handle unisolid when the player is falling down and when he was
+ // above the tile before
+ if(tile->getAttributes() & Tile::UNISOLID) {
+ if(object->movement.y < 0 || object->get_bbox().p2.y > y*32)
+ continue;
+ }
if(tile->getAttributes() & Tile::SLOPE) { // slope tile
AATriangle triangle;
if(tile->getAttributes() & Tile::SLOPE) { // slope tile
AATriangle triangle;