1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

* hopefully resolved bugs 19 and 20 reported by Zamolxis

This commit is contained in:
mateuszb
2009-02-06 15:56:03 +00:00
parent ba9b58d3a4
commit 811e6c0945
5 changed files with 19 additions and 6 deletions

View File

@@ -2506,7 +2506,17 @@ void CHeroList::select(int which)
selected = which;
LOCPLINT->adventureInt->centerOn(items[which].first->pos);
LOCPLINT->adventureInt->selection = items[which].first;
LOCPLINT->adventureInt->terrain.currentPath = items[which].second;
//recalculationg path in case of something has changed on map
if(items[which].second)
{
CPath * newPath = CGI->pathf->getPath(items[which].second->startPos(), items[which].second->endPos(), items[which].first);
LOCPLINT->adventureInt->terrain.currentPath = items[which].second = newPath;
}
else
{
LOCPLINT->adventureInt->terrain.currentPath = NULL;
}
//recalculated and assigned
draw();
LOCPLINT->adventureInt->townList.draw();
LOCPLINT->adventureInt->infoBar.draw(NULL);