소스 검색

Erase outdated path that was previously available

Dydzio 2 년 전
부모
커밋
aabb26d210
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      client/PlayerLocalState.cpp

+ 3 - 0
client/PlayerLocalState.cpp

@@ -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;