1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

small improvements

This commit is contained in:
mateuszb 2007-09-18 17:01:47 +00:00
parent 6d0bcef157
commit 6f4156c901
2 changed files with 3 additions and 0 deletions

View File

@ -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

View File

@ -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;