- hardened code for standalone mods

This commit is contained in:
Mark Vejvoda
2011-11-23 19:12:06 +00:00
parent aefdfd98f8
commit 115ef63f57
4 changed files with 95 additions and 58 deletions

View File

@@ -107,10 +107,12 @@ MenuBackground::MenuBackground(){
//load main model
mainModel= renderer.newModel(rsMenu);
if(mainModel) {
//mainModel->load(data_path + "data/core/menu/main_model/menu_main.g3d");
const XmlNode *mainMenuModelNode= menuNode->getChild("menu-background-model");
string mainModelFile = mainMenuModelNode->getAttribute("value")->getRestrictedValue();
string mainModelFile = "data/core/menu/main_model/menu_main.g3d";
if(menuNode->hasChild("menu-background-model") == true) {
//mainModel->load(data_path + "data/core/menu/main_model/menu_main.g3d");
const XmlNode *mainMenuModelNode= menuNode->getChild("menu-background-model");
mainModelFile = mainMenuModelNode->getAttribute("value")->getRestrictedValue();
}
mainModel->load(getGameCustomCoreDataPath(data_path, mainModelFile));
}