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

SectorMap: disable knownSubterraneanGates support to avoid loops

This commit is contained in:
ArseniyShestakov 2015-12-10 17:35:46 +03:00
parent c3e5231146
commit 975e049a3e

View File

@ -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;