mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +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:
@@ -415,7 +415,7 @@ bool CGUIManager::TemplateExists(const std::string& templateName) const
|
||||
|
||||
const CParamNode& CGUIManager::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