1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-15 01:24:45 +02:00

* spells in the guild visible again

* garrisons on adv. map again available from all directions
* working Subterranean Gates, Monoliths
* minor code reorganizations
This commit is contained in:
Michał W. Urbańczyk
2008-09-23 10:58:54 +00:00
parent e1be5896b9
commit 41acf5528c
15 changed files with 210 additions and 68 deletions

View File

@ -1101,10 +1101,23 @@ int getDir(int3 src, int3 dst)
void CPlayerInterface::heroMoved(const HeroMoveDetails & details)
{
boost::unique_lock<boost::recursive_mutex> un(*pim);
int3 buff = details.ho->pos;
buff.x-=11;
buff.y-=9;
buff = repairScreenPos(buff);
LOCPLINT->adventureInt->position = buff; //actualizing screen pos
if(adventureInt == curint)
adventureInt->minimap.draw();
if(details.style)
return;
//initializing objects and performing first step of move
const CGHeroInstance * ho = details.ho; //object representing this hero
int3 hp = details.src;
if (!details.successful)
if (!details.successful) //hero failed to move
{
ho->moveDir = getDir(details.src,details.dst);
ho->isStanding = true;
@ -1123,11 +1136,6 @@ void CPlayerInterface::heroMoved(const HeroMoveDetails & details)
adventureInt->terrain.currentPath->nodes.erase(adventureInt->terrain.currentPath->nodes.end()-1);
}
int3 buff = details.ho->pos;
buff.x-=11;
buff.y-=9;
buff = repairScreenPos(buff);
LOCPLINT->adventureInt->position = buff; //actualizing screen pos
if(details.dst.x+1 == details.src.x && details.dst.y+1 == details.src.y) //tl
{