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