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

SectorMap: remember all visitable objects in sector for wandering

This commit is contained in:
Arseniy Shestakov 2016-08-12 09:02:14 +03:00
parent b83dea2008
commit aabf4808da
2 changed files with 2 additions and 5 deletions

View File

@ -3045,10 +3045,7 @@ void SectorMap::exploreNewSector(crint3 pos, int num, CCallback * cbp)
if(t->visitable) if(t->visitable)
{ {
auto obj = t->visitableObjects.front(); auto obj = t->visitableObjects.front();
if (vstd::contains(ai->knownSubterraneanGates, obj)) s.visitableObjs.push_back(obj);
{
s.subterraneanGates.push_back (obj);
}
} }
} }
} }

View File

@ -79,7 +79,7 @@ struct SectorMap
int id; int id;
std::vector<int3> tiles; std::vector<int3> tiles;
std::vector<int3> embarkmentPoints; //tiles of other sectors onto which we can (dis)embark std::vector<int3> embarkmentPoints; //tiles of other sectors onto which we can (dis)embark
std::vector<const CGObjectInstance *> subterraneanGates; std::vector<const CGObjectInstance *> visitableObjs;
bool water; //all tiles of sector are land or water bool water; //all tiles of sector are land or water
Sector() Sector()
{ {