mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
small improvements
This commit is contained in:
parent
6d0bcef157
commit
6f4156c901
@ -669,6 +669,7 @@ void CPlayerInterface::heroMoved(const HeroMoveDetails & details)
|
||||
std::stable_sort(CGI->mh->ttiles[hp.x][hp.y][hp.z].objects.begin(), CGI->mh->ttiles[hp.x][hp.y][hp.z].objects.end(), ocmptwo_cgin);
|
||||
}
|
||||
LOCPLINT->adventureInt->update(); //updating screen
|
||||
CGI->screenh->updateScreen();
|
||||
SDL_framerateDelay(mainFPSmng); //for animation purposes
|
||||
}
|
||||
//main moving done
|
||||
|
@ -18,6 +18,8 @@ CPath * CPathfinder::getPath(int3 &src, int3 &dest, CHeroInstance * hero) //TODO
|
||||
{
|
||||
graph[i][j] = new CPathNode;
|
||||
graph[i][j]->accesible = !CGI->mh->ttiles[i][j][src.z].blocked;
|
||||
if(i==dest.x && j==dest.y && CGI->mh->ttiles[i][j][src.z].visitable)
|
||||
graph[i][j]->accesible = true; //for allowing visiting objects
|
||||
graph[i][j]->dist = -1;
|
||||
graph[i][j]->theNodeBefore = NULL;
|
||||
graph[i][j]->visited = false;
|
||||
|
Loading…
Reference in New Issue
Block a user