1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-13 01:20:34 +02:00

New pathfinder by Spasarto

This commit is contained in:
Michał W. Urbańczyk
2008-06-01 14:55:31 +00:00
parent b53c01ab92
commit 697f26529a
4 changed files with 389 additions and 159 deletions

View File

@ -308,7 +308,15 @@ void CTerrainRect::clickLeft(tribool down)
int3 bufpos = currentHero->getPosition(false);
//bufpos.x-=1;
if (mres)
currentPath = LOCPLINT->adventureInt->heroList.items[LOCPLINT->adventureInt->heroList.selected].second = CGI->pathf->getPath(bufpos,mp,currentHero,1);
{
vector<Coordinate>* p;
p = CGI->pathf->GetPath(Coordinate(bufpos),Coordinate(mp),currentHero);
//Convert to old format.
currentPath = LOCPLINT->adventureInt->heroList.items[LOCPLINT->adventureInt->heroList.selected].second = CGI->pathf->ConvertToOldFormat(p);
//currentPath = LOCPLINT->adventureInt->heroList.items[LOCPLINT->adventureInt->heroList.selected].second = CGI->pathf->getPath(bufpos,mp,currentHero,1);
}
}
void CTerrainRect::clickRight(tribool down)
{