1
0
forked from 0ad/0ad

Complain if an RMS tries to revert the loading progress.

Also increase estimated mapgen time, refs 942a45372c, 0e0ed94926.

Differential Revision: https://code.wildfiregames.com/D1341
Proposed By: Vladislav in D1340
This was SVN commit r21400.
This commit is contained in:
elexis 2018-03-01 12:06:55 +00:00
parent 5ea7458671
commit 2be4293dff
2 changed files with 6 additions and 2 deletions

View File

@ -214,7 +214,11 @@ void CMapGeneratorWorker::SetProgress(ScriptInterface::CxPrivate* pCxPrivate, in
// Copy data
CScopeLock lock(self->m_WorkerMutex);
self->m_Progress = progress;
if (progress >= self->m_Progress)
self->m_Progress = progress;
else
LOGWARNING("The random map script tried to reduce the loading progress from %d to %d", self->m_Progress, progress);
}
CParamNode CMapGeneratorWorker::GetTemplate(ScriptInterface::CxPrivate* pCxPrivate, const std::string& templateName)

View File

@ -176,7 +176,7 @@ void CMapReader::LoadRandomMap(const CStrW& scriptFile, JSRuntime* rt, JS::Handl
RegMemFun(this, &CMapReader::LoadPlayerSettings, L"CMapReader::LoadPlayerSettings", 50);
// load map generator with random map script
RegMemFun(this, &CMapReader::GenerateMap, L"CMapReader::GenerateMap", 5000);
RegMemFun(this, &CMapReader::GenerateMap, L"CMapReader::GenerateMap", 20000);
// parse RMS results into terrain structure
RegMemFun(this, &CMapReader::ParseTerrain, L"CMapReader::ParseTerrain", 500);