mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-27 21:12:18 +00:00
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:
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user