Fix XML
This commit is contained in:
@@ -149,7 +149,7 @@ void Game::LoadLevelXML(const char* mapname)
|
||||
buffer, result.description(), result.offset);
|
||||
}
|
||||
|
||||
for (pugi::xml_node entity : doc.child("Entities").children("Entity")) {
|
||||
for (pugi::xml_node entity : doc.child("Level").child("Entities").children("Entity")) {
|
||||
pugi::xml_attribute entityname = entity.attribute("name");
|
||||
pugi::xml_attribute classname = entity.attribute("classname");
|
||||
|
||||
|
||||
@@ -200,7 +200,7 @@ void SceneManager::loadScene(const char* filename)
|
||||
}
|
||||
|
||||
pugi::xml_node root = doc.document_element();
|
||||
const char* scenefilename = root.child("SceneFile").attribute("filename").value();
|
||||
const char* scenefilename = root.child("LevelDescription").child("SceneFile").attribute("filename").value();
|
||||
|
||||
m_sceneName = getFileNameWithoutExtension(scenefilename);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user