|
@@ -332,6 +332,7 @@ Error Globals::setup(const String& p_path,const String & p_main_pack) {
|
|
|
|
|
|
String candidate = d->get_current_dir();
|
|
String candidate = d->get_current_dir();
|
|
String current_dir = d->get_current_dir();
|
|
String current_dir = d->get_current_dir();
|
|
|
|
+ String exec_name = OS::get_singleton()->get_executable_path().get_file().basename();
|
|
bool found = false;
|
|
bool found = false;
|
|
bool first_time=true;
|
|
bool first_time=true;
|
|
|
|
|
|
@@ -339,7 +340,16 @@ Error Globals::setup(const String& p_path,const String & p_main_pack) {
|
|
//try to load settings in ascending through dirs shape!
|
|
//try to load settings in ascending through dirs shape!
|
|
|
|
|
|
//tries to open pack, but only first time
|
|
//tries to open pack, but only first time
|
|
- if (first_time && (_load_resource_pack(current_dir+"/data.pck") || _load_resource_pack(current_dir+"/data.pcz") )) {
|
|
|
|
|
|
+ if (first_time && (_load_resource_pack(current_dir+"/"+exec_name+".pck") || _load_resource_pack(current_dir+"/"+exec_name+".pcz") )) {
|
|
|
|
+ if (_load_settings("res://engine.cfg")==OK || _load_settings_binary("res://engine.cfb")==OK) {
|
|
|
|
+
|
|
|
|
+ _load_settings("res://override.cfg");
|
|
|
|
+ found=true;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ } else if (first_time && (_load_resource_pack(current_dir+"/data.pck") || _load_resource_pack(current_dir+"/data.pcz") )) {
|
|
if (_load_settings("res://engine.cfg")==OK || _load_settings_binary("res://engine.cfb")==OK) {
|
|
if (_load_settings("res://engine.cfg")==OK || _load_settings_binary("res://engine.cfb")==OK) {
|
|
|
|
|
|
_load_settings("res://override.cfg");
|
|
_load_settings("res://override.cfg");
|