diff --git a/AI/VCAI/VCAI.cpp b/AI/VCAI/VCAI.cpp index e349df9d4..b16b3b7aa 100644 --- a/AI/VCAI/VCAI.cpp +++ b/AI/VCAI/VCAI.cpp @@ -1512,6 +1512,11 @@ void VCAI::validateVisitableObjs() errorMsg = " shouldn't be on the visitable objects list!"; erase_if(visitableObjs, shouldBeErased); + //FIXME: how comes our own heroes become inaccessible? + erase_if(reservedHeroesMap, [](std::pair> hp) -> bool + { + return !hp.first.get(true); + }); for(auto &p : reservedHeroesMap) { errorMsg = " shouldn't be on list for hero " + p.first->name + "!";