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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user