mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
* fixed crashbug with dissmising heroes
* fixed bug with hero list redrawing after dissmissing
This commit is contained in:
parent
68d37e1507
commit
1b55f6457f
@ -302,7 +302,9 @@ void CTerrainRect::clickLeft(tribool down)
|
|||||||
currentPath=NULL;
|
currentPath=NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const CGHeroInstance * currentHero = LOCPLINT->adventureInt->heroList.items[LOCPLINT->adventureInt->heroList.selected].first;
|
const CGHeroInstance * currentHero = (LOCPLINT->adventureInt->heroList.items.size())?(LOCPLINT->adventureInt->heroList.items[LOCPLINT->adventureInt->heroList.selected].first):(NULL);
|
||||||
|
if(!currentHero)
|
||||||
|
return;
|
||||||
int3 bufpos = currentHero->getPosition(false);
|
int3 bufpos = currentHero->getPosition(false);
|
||||||
//bufpos.x-=1;
|
//bufpos.x-=1;
|
||||||
if (mres)
|
if (mres)
|
||||||
|
@ -2200,6 +2200,7 @@ void CHeroList::updateHList()
|
|||||||
genList();
|
genList();
|
||||||
if(selected>=items.size())
|
if(selected>=items.size())
|
||||||
select(items.size()-1);
|
select(items.size()-1);
|
||||||
|
draw();
|
||||||
}
|
}
|
||||||
void CHeroList::updateMove(const CGHeroInstance* which) //draws move points bar
|
void CHeroList::updateMove(const CGHeroInstance* which) //draws move points bar
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user