attempt to see if this corrects out of synch, i COULD NOT reproduce the out of synch with my winxp and linux 64 systems, perhaps titi had different ini values between linux and windows?

This commit is contained in:
Mark Vejvoda 2013-05-21 00:38:35 +00:00
parent 418d4bed0b
commit f98d9fdddc
4 changed files with 18 additions and 11 deletions

View File

@ -51,10 +51,11 @@ GameCamera::GameCamera() : pos(0.f, defaultHeight, 0.f),
state= sGame;
cacheVisibleQuad.clear();
MaxVisibleQuadItemCache = config.getInt("MaxVisibleQuadItemCache",intToStr(-1).c_str());
if(Config::getInstance().getBool("DisableCaching","false") == true) {
MaxVisibleQuadItemCache = 0;
}
//MaxVisibleQuadItemCache = config.getInt("MaxVisibleQuadItemCache",intToStr(-1).c_str());
MaxVisibleQuadItemCache = -1;
//if(Config::getInstance().getBool("DisableCaching","false") == true) {
// MaxVisibleQuadItemCache = 0;
//}
//config
speed= 15.f / GameConstants::cameraFps;

View File

@ -603,7 +603,8 @@ void Faction::init(
this->thisFaction= thisFaction;
this->world= game->getWorld();
this->scriptManager= game->getScriptManager();
cachingDisabled = (Config::getInstance().getBool("DisableCaching","false") == true);
//cachingDisabled = (Config::getInstance().getBool("DisableCaching","false") == true);
cachingDisabled = false;
resources.resize(techTree->getResourceTypeCount());
store.resize(techTree->getResourceTypeCount());
@ -628,8 +629,9 @@ void Faction::init(
loadGame(loadWorldNode, this->index,game->getGameSettings(),game->getWorld());
}
if( game->getGameSettings()->getPathFinderType() == pfBasic &&
Config::getInstance().getBool("EnableFactionWorkerThreads","true") == true) {
if( game->getGameSettings()->getPathFinderType() == pfBasic) {
// if( game->getGameSettings()->getPathFinderType() == pfBasic &&
// Config::getInstance().getBool("EnableFactionWorkerThreads","true") == true) {
if(workerThread != NULL) {
workerThread->signalQuit();
if(workerThread->shutdownAndWait() == true) {

View File

@ -1135,7 +1135,8 @@ void Unit::refreshPos() {
}
FowAlphaCellsLookupItem Unit::getFogOfWarRadius(bool useCache) const {
if(useCache == true && Config::getInstance().getBool("EnableFowCache","true") == true) {
//if(useCache == true && Config::getInstance().getBool("EnableFowCache","true") == true) {
if(useCache == true) {
return cachedFow;
}
@ -1170,7 +1171,8 @@ FowAlphaCellsLookupItem Unit::getFogOfWarRadius(bool useCache) const {
void Unit::calculateFogOfWarRadius() {
if(game->getWorld()->getFogOfWar() == true) {
if(Config::getInstance().getBool("EnableFowCache","true") == true && this->pos != this->cachedFowPos) {
//if(Config::getInstance().getBool("EnableFowCache","true") == true && this->pos != this->cachedFowPos) {
if(this->pos != this->cachedFowPos) {
cachedFow = getFogOfWarRadius(false);
static string mutexOwnerId = string(__FILE__) + string("_") + intToStr(__LINE__);

View File

@ -48,14 +48,16 @@ World::World() {
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
Config &config= Config::getInstance();
staggeredFactionUpdates = config.getBool("StaggeredFactionUpdates","false");
//staggeredFactionUpdates = config.getBool("StaggeredFactionUpdates","false");
staggeredFactionUpdates = false;
unitParticlesEnabled=config.getBool("UnitParticles","true");
ExploredCellsLookupItemCache.clear();
ExploredCellsLookupItemCacheTimer.clear();
ExploredCellsLookupItemCacheTimerCount = 0;
// Disable this cache as it takes too much RAM (not sure if its worth the performance gain)
enableFowAlphaCellsLookupItemCache = config.getBool("EnableFowCache","true");
//enableFowAlphaCellsLookupItemCache = config.getBool("EnableFowCache","true");
enableFowAlphaCellsLookupItemCache = true;
nextCommandGroupId = 0;
techTree = NULL;