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

VCAI: finish fixing of teleport probing for whirlpools

This commit is contained in:
ArseniyShestakov 2015-12-04 05:30:43 +03:00
parent 3800bd45b7
commit 791d1e7ab4

View File

@ -1887,16 +1887,16 @@ bool VCAI::moveHeroToTile(int3 dst, HeroPtr h)
auto doChannelProbing = [&]() -> void
{
auto currentExit = getObj(CGHeroInstance::convertPosition(h->pos,false), false);
auto currentExitPos = CGHeroInstance::convertPosition(h->pos,false);
assert(currentExit);
auto currentPos = CGHeroInstance::convertPosition(h->pos,false);
auto currentExit = getObj(currentPos, true)->id;
status.setChannelProbing(true);
for(auto exit : teleportChannelProbingList)
doTeleportMovement(exit, int3(-1));
teleportChannelProbingList.clear();
doTeleportMovement(currentExit->id, currentExitPos);
status.setChannelProbing(false);
doTeleportMovement(currentExit, currentPos);
};
int i=path.nodes.size()-1;