mirror of
https://github.com/glest/glest-source.git
synced 2025-10-02 18:36:48 +02:00
- for testing made max pathfinder nodecount configurable
This commit is contained in:
@@ -39,7 +39,7 @@ namespace Glest{ namespace Game{
|
|||||||
|
|
||||||
const int PathFinder::maxFreeSearchRadius = 10;
|
const int PathFinder::maxFreeSearchRadius = 10;
|
||||||
//const int PathFinder::pathFindNodesMax= 400;
|
//const int PathFinder::pathFindNodesMax= 400;
|
||||||
const int PathFinder::pathFindNodesMax = 1000;
|
int PathFinder::pathFindNodesMax = 1000;
|
||||||
const int PathFinder::pathFindRefresh = 20;
|
const int PathFinder::pathFindRefresh = 20;
|
||||||
const int PathFinder::pathFindBailoutRadius = 20;
|
const int PathFinder::pathFindBailoutRadius = 20;
|
||||||
|
|
||||||
@@ -57,6 +57,7 @@ PathFinder::PathFinder(const Map *map) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void PathFinder::init(const Map *map) {
|
void PathFinder::init(const Map *map) {
|
||||||
|
PathFinder::pathFindNodesMax = Config::getInstance().getInt("MaxPathfinderNodeCount",intToStr(PathFinder::pathFindNodesMax).c_str());
|
||||||
nodePool.resize(pathFindNodesMax);
|
nodePool.resize(pathFindNodesMax);
|
||||||
this->map= map;
|
this->map= map;
|
||||||
}
|
}
|
||||||
|
@@ -54,7 +54,7 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
static const int maxFreeSearchRadius;
|
static const int maxFreeSearchRadius;
|
||||||
static const int pathFindNodesMax;
|
static int pathFindNodesMax;
|
||||||
static const int pathFindRefresh;
|
static const int pathFindRefresh;
|
||||||
static const int pathFindBailoutRadius;
|
static const int pathFindBailoutRadius;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user