From: ehofman Date: Mon, 15 Sep 2003 14:21:16 +0000 (+0000) Subject: Add support for loading aircraft which have the configuration file inside it's own... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4d6b14a08c3be9458771b7cac3f19c6cad3ee82d;p=flightgear.git Add support for loading aircraft which have the configuration file inside it's own subdirectory --- diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index 605036cce..e5da97091 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -532,6 +532,14 @@ bool fgInitConfig ( int argc, char **argv ) { aircraft_path.append("Aircraft"); aircraft_path.append(aircraft); aircraft_path.concat("-set.xml"); + + if ( !ulFileExists(aircraft_path.c_str()) ) { + aircraft_path = globals->get_fg_root(); + aircraft_path.append("Aircraft"); + aircraft_path.append(aircraft); + aircraft_path.append(aircraft); + aircraft_path.concat("-set.xml"); + } SG_LOG(SG_INPUT, SG_INFO, "Reading default aircraft: " << aircraft << " from " << aircraft_path.str()); try {