浏览代码

Hopefully fixed ALL the cases when hero could use invalid path, for good.

DjWarmonger 12 年之前
父节点
当前提交
1b04f4fa9f
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      AI/VCAI/VCAI.cpp

+ 1 - 0
AI/VCAI/VCAI.cpp

@@ -1453,6 +1453,7 @@ bool VCAI::isAccessibleForHero(const int3 & pos, HeroPtr h, bool includeAllies /
 
 
 bool VCAI::moveHeroToTile(int3 dst, HeroPtr h)
 bool VCAI::moveHeroToTile(int3 dst, HeroPtr h)
 {
 {
+	cb->setSelection(h.h); //make sure we are using the RIGHT pathfinder
 	logAi->debugStream() << boost::format("Moving hero %s to tile %s") % h->name % dst;
 	logAi->debugStream() << boost::format("Moving hero %s to tile %s") % h->name % dst;
 	int3 startHpos = h->visitablePos();
 	int3 startHpos = h->visitablePos();
 	bool ret = false;
 	bool ret = false;