From 975e049a3e3b6f0e8b07bcbf83789ea58bd7e270 Mon Sep 17 00:00:00 2001 From: ArseniyShestakov Date: Thu, 10 Dec 2015 17:35:46 +0300 Subject: [PATCH] SectorMap: disable knownSubterraneanGates support to avoid loops --- AI/VCAI/VCAI.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/AI/VCAI/VCAI.cpp b/AI/VCAI/VCAI.cpp index d965cebda..8a87b858c 100644 --- a/AI/VCAI/VCAI.cpp +++ b/AI/VCAI/VCAI.cpp @@ -3245,6 +3245,14 @@ For ship construction etc, another function (goal?) is needed } } + +/* + // TODO: this code need to be rewritten in order to work porperly + // And we need to support teleport channels instead of just gates + // + // At moment it's cause more issues than it's solve so it's disabled. + // Check mantis 2119, 2228 and 2212 (Warmonger posts) + for (auto gate : s->subterraneanGates) { auto gatePair = ai->knownSubterraneanGates.find(gate); @@ -3259,6 +3267,7 @@ For ship construction etc, another function (goal?) is needed } } } +*/ } if(!preds[dest]) @@ -3372,6 +3381,9 @@ For ship construction etc, another function (goal?) is needed //TODO: pop sectors linked by Subterranean Gate in loop +/* + // Same as above, check issues 2119, 2228 + auto firstGate = boost::find_if(src->subterraneanGates, [=](const CGObjectInstance * gate) -> bool { //make sure no hero block the way @@ -3386,6 +3398,7 @@ For ship construction etc, another function (goal?) is needed //TODO: pahtfinder can find path through subterranean gates, but this function only reaches closest gate return (*firstGate)->visitablePos(); } +*/ //TODO //Monolith? Whirlpool? ... return ret;