Allow other root XML than entity.

Implements a `GetOnlyChild()`, following discussion at
https://irclogs.wildfiregames.com/%230ad-dev/2022-05-06-QuakeNet-%230ad-dev.log.

Differential revision: https://code.wildfiregames.com/D4738
Comments by: @phosit, @Stan, @vladislavbelov, @wraitii
This was SVN commit r27323.
This commit is contained in:
Freagarach
2022-12-30 07:34:23 +00:00
parent 5044850f93
commit ded41eab31
9 changed files with 26 additions and 9 deletions
+1 -1
View File
@@ -248,7 +248,7 @@ void CMapGeneratorWorker::SetProgress(int progress)
CParamNode CMapGeneratorWorker::GetTemplate(const std::string& templateName)
{
const CParamNode& templateRoot = m_TemplateLoader.GetTemplateFileData(templateName).GetChild("Entity");
const CParamNode& templateRoot = m_TemplateLoader.GetTemplateFileData(templateName).GetOnlyChild();
if (!templateRoot.IsOk())
LOGERROR("Invalid template found for '%s'", templateName.c_str());