1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Fixed one case of missing roads.

This commit is contained in:
DjWarmonger 2015-05-25 19:44:03 +02:00
parent a0ed8e0d6d
commit c6291412d7

View File

@ -774,7 +774,7 @@ bool CRmgTemplateZone::createRoad(CMapGenerator* gen, const int3& src, const int
//if (gen->map->checkForVisitableDir(currentNode, &gen->map->getTile(pos), pos)) //TODO: why it has no effect?
if (gen->isFree(pos) || pos == dst || (obj && obj->ID == Obj::MONSTER))
{
if (vstd::contains(this->tileinfo, pos)) //otherwise guard position may appear already connected to other zone.
if (vstd::contains(this->tileinfo, pos) || pos == dst) //otherwise guard position may appear already connected to other zone.
{
cameFrom[pos] = currentNode;
open.insert(pos);