From dc270fbbaa9cc4a208c0776c080ded481de7a7ce Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Sat, 12 May 2012 00:50:15 +0000 Subject: [PATCH] - rollback the last pathfinder change its no good --- source/glest_game/ai/path_finder.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/source/glest_game/ai/path_finder.h b/source/glest_game/ai/path_finder.h index 1797c925..47f7e0ae 100644 --- a/source/glest_game/ai/path_finder.h +++ b/source/glest_game/ai/path_finder.h @@ -341,21 +341,21 @@ private: } // Attempt to speed up pathfinding, only count up found path nodes // to the # we need till we will refresh anyways - else { - //build next pointers - int currentPathNodeCount = 0; - Node *currNode= node; - while(currNode->prev != NULL) { - currentPathNodeCount++; - currNode->prev->next= currNode; - currNode= currNode->prev; - } - - if(currentPathNodeCount > PathFinder::pathFindRefresh) { - pathFound = true; - break; - } - } +// else { +// //build next pointers +// int currentPathNodeCount = 0; +// Node *currNode= node; +// while(currNode->prev != NULL) { +// currentPathNodeCount++; +// currNode->prev->next= currNode; +// currNode= currNode->prev; +// } +// +// if(currentPathNodeCount > (PathFinder::pathFindRefresh * 2)) { +// pathFound = true; +// break; +// } +// } if(tryJPSPathfinder == true) { closedNodes[node->pos] = true;