mirror of
https://github.com/glest/glest-source.git
synced 2025-09-30 09:29:25 +02:00
- hardened code for standalone mods
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user