1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-16 02:47:36 +02:00

Merge branch 'develop' of https://github.com/vcmi/vcmi into develop

This commit is contained in:
DjWarmonger 2015-02-22 20:53:29 +01:00
commit 8d1f884d94

View File

@ -1652,6 +1652,11 @@ bool VCAI::moveHeroToTile(int3 dst, HeroPtr h)
assert(cb->getVisitableObjs(dst).size() > 1); //there's no point in revisiting tile where there is no visitable object assert(cb->getVisitableObjs(dst).size() > 1); //there's no point in revisiting tile where there is no visitable object
cb->moveHero(*h, CGHeroInstance::convertPosition(dst, true)); cb->moveHero(*h, CGHeroInstance::convertPosition(dst, true));
waitTillFree(); //movement may cause battle or blocking dialog waitTillFree(); //movement may cause battle or blocking dialog
if(!h) // TODO is it feasible to hero get killed there if game work properly?
{ // not sure if AI can currently reconsider to attack bank while staying on it. Check issue 2084 on mantis for more information.
lostHero(h);
throw std::runtime_error("Hero was lost!");
}
ret = true; ret = true;
} }
else else