BiomeMultiCache is not used for simple generators.
This commit is contained in:
parent
60e235362c
commit
e15b8600a6
@ -230,29 +230,30 @@ void cComposableGenerator::InitBiomeGen(cIniFile & a_IniFile)
|
|||||||
|
|
||||||
// Add a cache, if requested:
|
// Add a cache, if requested:
|
||||||
int CacheSize = a_IniFile.GetValueSetI("Generator", "BiomeGenCacheSize", CacheOffByDefault ? 0 : 64);
|
int CacheSize = a_IniFile.GetValueSetI("Generator", "BiomeGenCacheSize", CacheOffByDefault ? 0 : 64);
|
||||||
int MultiCacheLength = a_IniFile.GetValueSetI("Generator", "BiomeGenMultiCacheLength", 4);
|
|
||||||
|
|
||||||
if (CacheSize > 0)
|
if (CacheSize <= 0)
|
||||||
{
|
{
|
||||||
if (CacheSize < 4)
|
return;
|
||||||
{
|
}
|
||||||
LOGWARNING("Biomegen cache size set too low, would hurt performance instead of helping. Increasing from %d to %d",
|
|
||||||
CacheSize, 4
|
int MultiCacheLength = a_IniFile.GetValueSetI("Generator", "BiomeGenMultiCacheLength", 4);
|
||||||
);
|
if (CacheSize < 4)
|
||||||
CacheSize = 4;
|
{
|
||||||
}
|
LOGWARNING("Biomegen cache size set too low, would hurt performance instead of helping. Increasing from %d to %d",
|
||||||
LOGD("Using a cache for biomegen of size %d.", CacheSize);
|
CacheSize, 4
|
||||||
m_UnderlyingBiomeGen = m_BiomeGen;
|
);
|
||||||
if (MultiCacheLength > 0)
|
CacheSize = 4;
|
||||||
{
|
}
|
||||||
LOGD("Enabling multicache for biomegen of length %d.", MultiCacheLength);
|
LOGD("Using a cache for biomegen of size %d.", CacheSize);
|
||||||
m_BiomeGen = new cBioGenMulticache(m_UnderlyingBiomeGen, CacheSize, MultiCacheLength);
|
m_UnderlyingBiomeGen = m_BiomeGen;
|
||||||
}
|
if (MultiCacheLength > 0)
|
||||||
else
|
{
|
||||||
{
|
LOGD("Enabling multicache for biomegen of length %d.", MultiCacheLength);
|
||||||
m_BiomeGen = new cBioGenCache(m_UnderlyingBiomeGen, CacheSize);
|
m_BiomeGen = new cBioGenMulticache(m_UnderlyingBiomeGen, CacheSize, MultiCacheLength);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_BiomeGen = new cBioGenCache(m_UnderlyingBiomeGen, CacheSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user