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

Erase outdated path that was previously available

This commit is contained in:
Dydzio 2023-09-13 22:25:33 +02:00
parent 248afa523d
commit aabb26d210

View File

@ -68,7 +68,10 @@ bool PlayerLocalState::setPath(const CGHeroInstance * h, const int3 & destinatio
{
CGPath path;
if(!owner.cb->getPathsInfo(h)->getPath(path, destination))
{
paths.erase(h); //invalidate previously possible path if selected (before other hero blocked only path / fly spell expired)
return false;
}
setPath(h, path);
return true;