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

VCAI: restoring teleport probing feature for updated mechanics

This commit is contained in:
ArseniyShestakov 2015-12-02 19:26:24 +03:00
parent b5100bee94
commit eb9f29e368

View File

@ -631,13 +631,18 @@ void VCAI::showTeleportDialog(TeleportChannelID channel, TTeleportExitsList exit
if(destinationTeleport != ObjectInstanceID() && vstd::contains(exits, neededExit)) if(destinationTeleport != ObjectInstanceID() && vstd::contains(exits, neededExit))
choosenExit = vstd::find_pos(exits, neededExit); choosenExit = vstd::find_pos(exits, neededExit);
/* if(!status.channelProbing()) if(!status.channelProbing())
{ {
vstd::copy_if(exits, vstd::set_inserter(teleportChannelProbingList), [&](ObjectInstanceID id) -> bool for(auto exit : exits)
{ {
return !(vstd::contains(visitableObjs, cb->getObj(id)) || id == choosenExit); if(!vstd::contains(visitableObjs, cb->getObj(exit.first)) &&
}); !vstd::contains(teleportChannelProbingList, exit.first) &&
}*/ exit.first != destinationTeleport)
{
teleportChannelProbingList.push_back(exit.first);
}
}
}
} }
requestActionASAP([=]() requestActionASAP([=]()