mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-01 00:45:26 +02:00
Now hero movement should be working.
- fixed/added #22, #24, #25, #8, #11, partially #19 - minor improvements
This commit is contained in:
@ -41,12 +41,17 @@ int internalFunc(void * callback)
|
||||
break;
|
||||
case 'H': //position of hero
|
||||
readed>>heronum;
|
||||
std::cout<<"Position of hero "<<heronum<<": "<<CGI->heroh->heroInstances[heronum]->pos<<std::endl;
|
||||
break;
|
||||
case 'M': //move hero
|
||||
readed>>heronum>>dest;
|
||||
cb->moveHero(heronum, dest);
|
||||
std::cout<<"Position of hero "<<heronum<<": "<<CGI->heroh->heroInstances[heronum]->getPosition(false)<<std::endl;
|
||||
break;
|
||||
case 'M': //move heroa
|
||||
{
|
||||
readed>>heronum>>dest;
|
||||
const CHeroInstance * hero = cb->getHeroInfo(0,heronum,0);
|
||||
CPath * path = CGI->pathf->getPath(hero->getPosition(false),dest,hero);
|
||||
cb->moveHero(heronum, path, 0, 0);
|
||||
delete path;
|
||||
break;
|
||||
}
|
||||
case 'D': //pos description
|
||||
readed>>src;
|
||||
CGI->mh->getObjDescriptions(src);
|
||||
|
Reference in New Issue
Block a user