|
@@ -1192,7 +1192,8 @@ void CAdvMapInt::keyPressed(const SDL_KeyboardEvent & key)
|
|
|
|
|
|
CGPath &path = LOCPLINT->paths[h];
|
|
|
terrain.currentPath = &path;
|
|
|
- if(!LOCPLINT->cb->getPathsInfo(h)->getPath(h->getPosition(false) + dir, path))
|
|
|
+ int3 dst = h->getPosition(false) + dir;
|
|
|
+ if(dst != verifyPos(dst) || !LOCPLINT->cb->getPathsInfo(h)->getPath(dst, path))
|
|
|
{
|
|
|
terrain.currentPath = nullptr;
|
|
|
return;
|