1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-03 13:01:33 +02:00

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

This commit is contained in:
DjWarmonger 2013-12-20 10:15:29 +00:00
parent d085f8eee8
commit 1b04f4fa9f

View File

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