From: Matthias Braun Date: Thu, 5 May 2005 16:22:25 +0000 (+0000) Subject: improve unisolid tile handling X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=609794e5b7fb466ca1a53d7a2406e2a8ed547de8;p=supertux.git improve unisolid tile handling SVN-Revision: 2409 --- diff --git a/src/sector.cpp b/src/sector.cpp index 1d14695a6..46927eb60 100644 --- 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; + // skip non-solid tiles 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;