diff --git a/Crawler/Crawler.cpp b/Crawler/Crawler.cpp index 07c3bef3..3dffcc70 100644 --- a/Crawler/Crawler.cpp +++ b/Crawler/Crawler.cpp @@ -1112,6 +1112,7 @@ geom2d::rectCrawler::GetTileCollision(MapName map,vf2d pos,bool upperLevel) if(foundRect.pos==NO_COLLISION.pos&&foundRect.size==NO_COLLISION.size){ foundRect=collisionRect; }else{ + //When we find another rectangle in the same square, we expand it to consume the area, whichever tile creates a larger surface or the combination of the two. foundRect.pos.x=std::min(foundRect.pos.x,collisionRect.pos.x); foundRect.pos.y=std::min(foundRect.pos.y,collisionRect.pos.y); foundRect.size.x=std::max(foundRect.size.x,collisionRect.size.x);