adding config file entry #381
This commit is contained in:
parent
77409d47eb
commit
d9afe6dd65
@ -230,6 +230,8 @@ 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)
|
if (CacheSize < 4)
|
||||||
@ -241,7 +243,14 @@ void cComposableGenerator::InitBiomeGen(cIniFile & a_IniFile)
|
|||||||
}
|
}
|
||||||
LOGD("Using a cache for biomegen of size %d.", CacheSize);
|
LOGD("Using a cache for biomegen of size %d.", CacheSize);
|
||||||
m_UnderlyingBiomeGen = m_BiomeGen;
|
m_UnderlyingBiomeGen = m_BiomeGen;
|
||||||
m_BiomeGen = new cBioGenMulticache(m_UnderlyingBiomeGen, CacheSize, 4);
|
if (MultiCacheLength > 0) {
|
||||||
|
LOGD("Enabling multicache for biomegen of length %d.", MultiCacheLength);
|
||||||
|
m_BiomeGen = new cBioGenMulticache(m_UnderlyingBiomeGen, CacheSize, MultiCacheLength);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
m_BiomeGen = new cBioGenCache(m_UnderlyingBiomeGen, CacheSize);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user