From 6f4156c9015553f6757b4f634e91d3e2f346b359 Mon Sep 17 00:00:00 2001 From: mateuszb Date: Tue, 18 Sep 2007 17:01:47 +0000 Subject: [PATCH] small improvements --- CGameInterface.cpp | 1 + CPathfinder.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CGameInterface.cpp b/CGameInterface.cpp index d49440953..43f7eaa7e 100644 --- a/CGameInterface.cpp +++ b/CGameInterface.cpp @@ -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 diff --git a/CPathfinder.cpp b/CPathfinder.cpp index 8926a7c21..d96c478e8 100644 --- a/CPathfinder.cpp +++ b/CPathfinder.cpp @@ -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;