mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-26 22:57:00 +02:00
Allow center Town touch the blocked area, it's no longer a problem with correct pathfinder.
This commit is contained in:
parent
682e9ae297
commit
d5b799278e
@ -163,11 +163,14 @@ void TownPlacer::cleanupBoundaries(const rmg::Object & rmgObject)
|
|||||||
Zone::Lock lock(zone.areaMutex);
|
Zone::Lock lock(zone.areaMutex);
|
||||||
for(const auto & t : rmgObject.getArea().getBorderOutside())
|
for(const auto & t : rmgObject.getArea().getBorderOutside())
|
||||||
{
|
{
|
||||||
if(map.isOnMap(t))
|
if (t.y > rmgObject.getVisitablePosition().y) //Line below the town
|
||||||
{
|
{
|
||||||
map.setOccupied(t, ETileType::FREE);
|
if (map.isOnMap(t))
|
||||||
zone.areaPossible().erase(t);
|
{
|
||||||
zone.freePaths().add(t);
|
map.setOccupied(t, ETileType::FREE);
|
||||||
|
zone.areaPossible().erase(t);
|
||||||
|
zone.freePaths().add(t);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user