- rollback the last pathfinder change its no good
This commit is contained in:
parent
ef39f93457
commit
dc270fbbaa
|
@ -341,21 +341,21 @@ private:
|
||||||
}
|
}
|
||||||
// Attempt to speed up pathfinding, only count up found path nodes
|
// Attempt to speed up pathfinding, only count up found path nodes
|
||||||
// to the # we need till we will refresh anyways
|
// to the # we need till we will refresh anyways
|
||||||
else {
|
// else {
|
||||||
//build next pointers
|
// //build next pointers
|
||||||
int currentPathNodeCount = 0;
|
// int currentPathNodeCount = 0;
|
||||||
Node *currNode= node;
|
// Node *currNode= node;
|
||||||
while(currNode->prev != NULL) {
|
// while(currNode->prev != NULL) {
|
||||||
currentPathNodeCount++;
|
// currentPathNodeCount++;
|
||||||
currNode->prev->next= currNode;
|
// currNode->prev->next= currNode;
|
||||||
currNode= currNode->prev;
|
// currNode= currNode->prev;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
if(currentPathNodeCount > PathFinder::pathFindRefresh) {
|
// if(currentPathNodeCount > (PathFinder::pathFindRefresh * 2)) {
|
||||||
pathFound = true;
|
// pathFound = true;
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
if(tryJPSPathfinder == true) {
|
if(tryJPSPathfinder == true) {
|
||||||
closedNodes[node->pos] = true;
|
closedNodes[node->pos] = true;
|
||||||
|
|
Loading…
Reference in New Issue