- removed printf's as they slowed down pathfinding
This commit is contained in:
parent
624237ed47
commit
2c8b1739e5
|
@ -767,9 +767,10 @@ TravelState PathFinder::aStar(Unit *unit, const Vec2i &targetPos, bool inBailout
|
||||||
//printf("AStar set maxNodeCount = %d\n",maxNodeCount);
|
//printf("AStar set maxNodeCount = %d\n",maxNodeCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(maxNodeCount >= 1 && unit->getPathfindFailedConsecutiveFrameCount() >= 10) {
|
if(maxNodeCount >= 1 && unit->getPathfindFailedConsecutiveFrameCount() >= 3) {
|
||||||
|
int orgmaxNodeCount = maxNodeCount;
|
||||||
maxNodeCount = 200;
|
maxNodeCount = 200;
|
||||||
//printf("AStar maxpath cut for unit [%d - %s] to %d\n",unit->getId(),unit->getFullName().c_str(), maxNodeCount);
|
//printf("AStar maxpath cut for unit [%d - %s] to %d [orig: %d] [unit->getPathfindFailedConsecutiveFrameCount(): %d]\n",unit->getId(),unit->getFullName().c_str(), maxNodeCount,orgmaxNodeCount,unit->getPathfindFailedConsecutiveFrameCount());
|
||||||
}
|
}
|
||||||
|
|
||||||
UnitPathInterface *path= unit->getPath();
|
UnitPathInterface *path= unit->getPath();
|
||||||
|
|
|
@ -390,7 +390,7 @@ private:
|
||||||
//!!!
|
//!!!
|
||||||
//if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled == true && chrono.getMillis() > 1) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] took msecs: %lld nodeLimitReached = %d whileLoopCount = %d nodePoolCount = %d\n",__FILE__,__FUNCTION__,__LINE__,chrono.getMillis(),nodeLimitReached,whileLoopCount,factionState.nodePoolCount);
|
//if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled == true && chrono.getMillis() > 1) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] took msecs: %lld nodeLimitReached = %d whileLoopCount = %d nodePoolCount = %d\n",__FILE__,__FUNCTION__,__LINE__,chrono.getMillis(),nodeLimitReached,whileLoopCount,factionState.nodePoolCount);
|
||||||
if(chrono.getMillis() > 1) {
|
if(chrono.getMillis() > 1) {
|
||||||
printf("AStar for unit [%d - %s] took msecs: %lld nodeLimitReached = %d whileLoopCount = %d nodePoolCount = %d curFrameIndex = %d travel distance = %f\n",unit->getId(),unit->getFullName().c_str(), (long long int)chrono.getMillis(),nodeLimitReached,whileLoopCount,factionState.nodePoolCount,curFrameIndex,unit->getPos().dist(finalPos));
|
//printf("AStar for unit [%d - %s] took msecs: %lld nodeLimitReached = %d whileLoopCount = %d nodePoolCount = %d curFrameIndex = %d travel distance = %f\n",unit->getId(),unit->getFullName().c_str(), (long long int)chrono.getMillis(),nodeLimitReached,whileLoopCount,factionState.nodePoolCount,curFrameIndex,unit->getPos().dist(finalPos));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user