1
0
Fork 0
flightgear/src
Florent Rougon 1d34b96d49 Don't load resources for the current aircraft from several aircraft dirs
* If one has the same aircraft in several aircraft directories,
  FlightGear should not mix resources from the various aircraft
  directories. For instance, if one starts FG with:

    --fg-aircraft=/my/personal/dir:/path/to/fgaddon/Aircraft

  and one has in /my/personal/dir/ec130 a clone of the upstream
  developer repo, FlightGear should use either the upstream version from
  /my/personal/dir/ec130 or the FGAddon version from
  /path/to/fgaddon/Aircraft/ec130, but not some strange, untested hybrid
  of both.

* This commit makes sure that when the looked-up resource starts with
  Aircraft/<ac>, where <ac> is the current aircraft name [last component
  of aircraftDir = fgGetString("/sim/aircraft-dir")], then
  AircraftResourceProvider::resolve() doesn't search other aircraft
  directories if the resource isn't found under 'aircraftDir'.

* To reproduce the bug before this commit, you may add the following
  code (there is nothing specific about the SenecaII here, it's just the
  aircraft I used for testing):

    var file_path = resolvepath("Aircraft/SenecaII/flo-test");
    if (file_path != "")
      gui.popupTip("flo-test found", 2);
    else
      gui.popupTip("flo-test not found", 2);

  in a keyboard binding for the SenecaII (for instance; you may use the
  F11 binding that otherwise only prints a short message). You should
  add this to the SenecaII/SenecaII-base.xml file *that will be loaded
  by FlightGear*, let's say the one under /my/personal/dir in the
  example above (beware of the <path-cache> in autosave_X_Y.xml). Then,
  by creating or removing a file named "flo-test" in the SenecaII
  subdirectory of other aircraft dirs (for instance,
  /path/to/fgaddon/Aircraft in the example above), you can see that the
  behavior of the loaded aircraft is influenced by the contents of
  unrelated versions of the same aircraft that might be present in other
  aircraft dirs (e.g., loaded /my/personal/dir/SenecaII influenced by
  /path/to/fgaddon/Aircraft/SenecaII).

* Aircrafts loading resources using paths relative to the current
  aircraft directory (e.g., with 'resolvepath("flo-test")') are not
  affected by this kind of problem, because this scheme is handled by
  CurrentAircraftDirProvider, which does not exhibit this bug.
2015-09-26 09:45:33 +02:00
..
AIModel stop sending velocity and acceleration in the motion information when crashed 2015-06-13 11:02:30 +02:00
Aircraft FlightHistory: add pagedPathForHistory 2015-03-03 17:08:20 +01:00
Airports Temporary fix: ground networks are not loaded when a navcache is present. But, the AI/ATC code relies on radio frequencies listed in the groundnet files. Since these are not imported into the nav cache, they remain 0. 2015-05-15 21:42:10 +02:00
ATC Fix some warnings 2015-06-12 11:51:11 +02:00
Autopilot Cleanup: remove unused code and includes 2015-07-08 17:24:13 +02:00
Canvas Make fgValidatePath always return std::string, not char * 2015-03-13 18:07:24 +00:00
Cockpit Canvas: move Window class to simgear. 2014-05-09 16:42:54 +02:00
Environment remove obsolete comments 2015-04-09 19:05:22 +01:00
FDM Fixed the pilot acceleration for consistency with the accelerometer computation 2015-08-09 20:00:08 +02:00
GUI Use +=, not (5.5+ only) append, for concatenating QVectors 2015-09-21 22:12:24 +01:00
Include Cmake always generates version.h 2015-03-08 00:42:39 +00:00
Input Fix a clang warning. 2015-04-11 21:59:37 +01:00
Instrumentation Add 8.33 kHz support to the commradio 2015-05-28 12:04:23 +02:00
Main Don't load resources for the current aircraft from several aircraft dirs 2015-09-26 09:45:33 +02:00
Model Update for OpenSceneGraph 3.3.2 API changes. 2014-08-09 19:13:39 +02:00
MultiPlayer stop sending velocity and acceleration in the motion information when crashed 2015-06-13 11:02:30 +02:00
Navaids Remove / reduce level on some debug output 2015-06-08 10:37:26 +01:00
Network Lots of work on aircraft package support 2015-09-20 19:46:35 -05:00
Radio Portability: Fix compile errors on MSVC (cmath) 2015-03-24 11:11:42 -05:00
Scenery Remove / reduce level on some debug output 2015-06-08 10:37:26 +01:00
Scripting Nasal: use SG_LOG for security error messages to avoid truncation 2015-08-14 21:37:28 +01:00
Sound Fix some warnings 2015-06-12 11:51:11 +02:00
Systems Optionally disable the lowpass for the static system 2014-09-10 21:07:57 +02:00
Time Tie the sun vector to the property tree 2015-06-26 09:53:03 +02:00
Traffic Workaround for problem with SGPath: create_dir() does not create the last subdirectory when passed a dir-path only. 2015-05-14 17:41:58 +02:00
Viewer Remove / reduce level on some debug output 2015-06-08 10:37:26 +01:00
CMakeLists.txt Cleanup of ATCDCL 2014-04-30 10:22:51 +02:00