From 609794e5b7fb466ca1a53d7a2406e2a8ed547de8 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Thu, 5 May 2005 16:22:25 +0000 Subject: [PATCH] improve unisolid tile handling SVN-Revision: 2409 --- src/sector.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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; -- 2.11.0