mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Merge pull request #2826 from dydzio0614/remove-outdated-path
Erase outdated path that was previously available
This commit is contained in:
commit
beaeeebcf1
@ -68,7 +68,10 @@ bool PlayerLocalState::setPath(const CGHeroInstance * h, const int3 & destinatio
|
|||||||
{
|
{
|
||||||
CGPath path;
|
CGPath path;
|
||||||
if(!owner.cb->getPathsInfo(h)->getPath(path, destination))
|
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;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
setPath(h, path);
|
setPath(h, path);
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user