1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-04-17 11:56:46 +02:00

CPathfinder: fix possible crash when using invisible teleport exit

This one is similar with FoW bug when hero was covered by FoW while one tile around wasn't.
This commit is contained in:
ArseniyShestakov 2015-12-11 04:00:10 +03:00
parent 975e049a3e
commit a430769b44

View File

@ -189,6 +189,13 @@ void CPathfinder::calculatePaths()
dp = out.getNode(neighbour, cp->layer);
if(dp->locked)
continue;
/// TODO: We may consider use invisible exits on FoW border in future
/// Useful for AI when at least one tile around exit is visible and passable
/// Objects are usually visible on FoW border anyway so it's not cheating.
///
/// For now it's disabled as it's will cause crashes in movement code.
if(dp->accessible == CGPathNode::BLOCKED)
continue;
if(isBetterWay(movement, turn))
{