1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

Removed AI bottleneck on water-based maps.

This commit is contained in:
DjWarmonger 2014-04-03 09:57:44 +00:00
parent 13f72e581e
commit 2da3d7d7c3

View File

@ -2995,9 +2995,7 @@ For ship construction etc, another function (goal?) is needed
shipyards.push_back(t); shipyards.push_back(t);
} }
std::vector<const CGObjectInstance*> visObjs; for(const CGObjectInstance *obj : ai->visitableObjs)
ai->retreiveVisitableObjs(visObjs, true);
for(const CGObjectInstance *obj : visObjs)
{ {
if(obj->ID != Obj::TOWN) //towns were handled in the previous loop if(obj->ID != Obj::TOWN) //towns were handled in the previous loop
if(const IShipyard *shipyard = IShipyard::castFrom(obj)) if(const IShipyard *shipyard = IShipyard::castFrom(obj))