1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Various player/AI interface related fixes and improvements.

This commit is contained in:
Michał W. Urbańczyk
2011-07-17 18:49:05 +00:00
parent ef954b8a4f
commit 79f5b29196
10 changed files with 48 additions and 34 deletions

View File

@@ -238,6 +238,13 @@ void CPlayerInterface::heroMoved(const TryMoveHero & details)
const CGHeroInstance * ho = cb->getHero(details.id); //object representing this hero
int3 hp = details.start;
if(!ho)
{
//AI hero left the visible area (we can't obtain info)
//TODO - probably needs some handling
return;
}
adventureInt->centerOn(ho); //actualizing screen pos
adventureInt->minimap.draw(screen2);
adventureInt->heroList.draw(screen2);