Browse Source

small improvements

mateuszb 18 years ago
parent
commit
6f4156c901
2 changed files with 3 additions and 0 deletions
  1. 1 0
      CGameInterface.cpp
  2. 2 0
      CPathfinder.cpp

+ 1 - 0
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

+ 2 - 0
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;