Skip to content

Commit

Permalink
supertux/tile.hpp: Implement Tile::is_unisolid().
Browse files Browse the repository at this point in the history
SVN-Revision: 6594
  • Loading branch information
Florian Forster committed Mar 11, 2010
1 parent 73b14ee commit 08d0d2a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/supertux/sector.cpp
Expand Up @@ -1273,7 +1273,7 @@ Sector::collision_tilemap(collision::Constraints* constraints,

// only handle unisolid when the player is falling down and when he was
// above the tile before
if(tile->getAttributes() & Tile::UNISOLID) {
if(tile->is_unisolid ()) {
int status;
Vector relative_movement = movement
- solids->get_movement(/* actual = */ true);
Expand Down Expand Up @@ -1681,7 +1681,7 @@ Sector::is_free_of_tiles(const Rectf& rect, const bool ignoreUnisolid) const
if(!tile) continue;
if(!(tile->getAttributes() & Tile::SOLID))
continue;
if((tile->getAttributes() & Tile::UNISOLID) && ignoreUnisolid)
if(tile->is_unisolid () && ignoreUnisolid)
continue;
if(tile->is_slope ()) {
AATriangle triangle;
Expand Down
5 changes: 5 additions & 0 deletions src/supertux/tile.hpp
Expand Up @@ -128,6 +128,11 @@ class Tile
return ((attributes & SLOPE) != 0);
}

bool is_unisolid (void) const
{
return ((attributes & UNISOLID) != 0);
}

void print_debug(int id) const;

private:
Expand Down

0 comments on commit 08d0d2a

Please sign in to comment.