]> git.mxchange.org Git - flightgear.git/log
flightgear.git
8 years agoMerge /u/edauvergne/flightgear/ branch fdm_restoration into next
James Turner [Thu, 10 Dec 2015 22:35:07 +0000 (22:35 +0000)]
Merge /u/edauvergne/flightgear/ branch fdm_restoration into next

http://sourceforge.net/p/flightgear/flightgear/merge-requests/24/

8 years agoRemove /sim/temp/winding-ccw property
James Turner [Thu, 10 Dec 2015 21:07:21 +0000 (15:07 -0600)]
Remove /sim/temp/winding-ccw property

- part of work on unit-testing, remove OpenGL usage in fg_props

8 years agoRelocate implementation of geocRadialIntersection
James Turner [Thu, 10 Dec 2015 21:06:33 +0000 (15:06 -0600)]
Relocate implementation of geocRadialIntersection

8 years agoTemplated subsystem handling
James Turner [Thu, 10 Dec 2015 21:05:54 +0000 (15:05 -0600)]
Templated subsystem handling

- remove explicit FGControls var from globals, as part of work
  towards unit-testing infrastructure.

8 years agoSplit GroundNetwork class down the middle
James Turner [Wed, 9 Dec 2015 13:01:24 +0000 (14:01 +0100)]
Split GroundNetwork class down the middle

- ATC functions move to GroundController, which layers above
  remaining GroundNetwork functionality
- dynamics owns both the groundNetwork and the ground controller.

8 years agoMerge /u/edauvergne/flightgear/ branch warning_cleanup_UIUC_LaRCsim into next
James Turner [Thu, 10 Dec 2015 20:22:56 +0000 (20:22 +0000)]
Merge /u/edauvergne/flightgear/ branch warning_cleanup_UIUC_LaRCsim into next

http://sourceforge.net/p/flightgear/flightgear/merge-requests/26/

8 years agoRead the scenery global scene effects configration file and update them every frame...
Erik Hofman [Thu, 10 Dec 2015 12:24:52 +0000 (13:24 +0100)]
Read the scenery global scene effects configration file and update them every frame. The SceneFX class is not yet registered though.

8 years agoLaRCsim FDM - detabbing of all files.
Edward d'Auvergne [Thu, 10 Dec 2015 09:07:21 +0000 (10:07 +0100)]
LaRCsim FDM - detabbing of all files.

All '\t' have been replaced with 8 spaces, as most of the code is indented with spaces.

8 years agoUIUC FDM - detabbing of all files.
Edward d'Auvergne [Thu, 10 Dec 2015 09:04:45 +0000 (10:04 +0100)]
UIUC FDM - detabbing of all files.

All '\t' have been replaced with 8 spaces, as most of the code is indented with spaces.

8 years agoLaRCsim cleanup of -Wimplicit-function-declaration compilation warnings.
Edward d'Auvergne [Thu, 10 Dec 2015 08:36:04 +0000 (09:36 +0100)]
LaRCsim cleanup of -Wimplicit-function-declaration compilation warnings.

The stub FDM/LaRCsim/default_model_routines.h header has been expanded and completed.

8 years agoLaRCsim cleanup of -Wunused-variable compilation warnings.
Edward d'Auvergne [Thu, 10 Dec 2015 08:23:29 +0000 (09:23 +0100)]
LaRCsim cleanup of -Wunused-variable compilation warnings.

A number of static array definitions were shifted into the scope of the function.

8 years agoLaRCsim cleanup of -Wformat-contains-nul compilation warnings.
Edward d'Auvergne [Thu, 10 Dec 2015 08:13:34 +0000 (09:13 +0100)]
LaRCsim cleanup of -Wformat-contains-nul compilation warnings.

The sprintf() function automatically adds the terminating null character, so no
need to have it in the formatting string.

8 years agoUIUC cleanup of -Wunused-but-set-variable compilation warnings.
Edward d'Auvergne [Thu, 10 Dec 2015 08:11:09 +0000 (09:11 +0100)]
UIUC cleanup of -Wunused-but-set-variable compilation warnings.

The two unused variables were commented out.

8 years agoUIUC cleanup for -Wsign-compare compilation warnings.
Edward d'Auvergne [Thu, 10 Dec 2015 08:02:00 +0000 (09:02 +0100)]
UIUC cleanup for -Wsign-compare compilation warnings.

The string find_first_not_of() and find_first_of() functions return string::npos
if not found, rather than -1.

8 years agoUIUC and LaRCsim cleanup of -Wunused-variable compilation warnings.
Edward d'Auvergne [Thu, 10 Dec 2015 07:47:35 +0000 (08:47 +0100)]
UIUC and LaRCsim cleanup of -Wunused-variable compilation warnings.

This is for defined but unused variables, many of which are in commented out
code.

8 years agoUIUC cleanup of -Wparentheses compilation warnings.
Edward d'Auvergne [Thu, 10 Dec 2015 07:25:17 +0000 (08:25 +0100)]
UIUC cleanup of -Wparentheses compilation warnings.

8 years agoOn Mac, force the macon-min-version value
James Turner [Tue, 8 Dec 2015 20:46:54 +0000 (20:46 +0000)]
On Mac, force the macon-min-version value

- Workaround for CMAKE_OSX_DEPLOYMENT_TARGET not behaving as it’s
  supposed to reliably.

8 years agoSync JSBSim again
Erik Hofman [Mon, 7 Dec 2015 10:10:03 +0000 (11:10 +0100)]
Sync JSBSim again

8 years agoThe OSG version is now printed with --version.
Edward d'Auvergne [Sat, 5 Dec 2015 14:24:47 +0000 (15:24 +0100)]
The OSG version is now printed with --version.

This adds the OSG version number between the simgear and PLIB versions.

8 years agoReactivated the UIUC, LaRCsim, and special purpose FDMs.
Edward d'Auvergne [Sat, 5 Dec 2015 13:35:23 +0000 (14:35 +0100)]
Reactivated the UIUC, LaRCsim, and special purpose FDMs.

As the FlightGear distribution ships aircraft based on these FDMs with each
release, the shipped FlightGear executables should therefore be able to handle
these aircraft.  For example the unique ornithopter can only be flown with the
UIUC FDM, hence it is available for download but will be non-functional for most
users.

This partly reverts commit e819a4aaa44da6be816460fe719b1f65e0a2db3c from Nov 1,
2011 which deactivated the compilation of these in the CMakeLists.txt file.

Signed-off-by: Edward d'Auvergne <edward@nmr-relax.com>
8 years agoAdd airport dynamics manager
James Turner [Sat, 5 Dec 2015 00:25:29 +0000 (00:25 +0000)]
Add airport dynamics manager

- decouple dynamic airport data from the static (nav-db) data.

8 years agoCheckpoint - ground-net skips the cache
James Turner [Tue, 1 Dec 2015 00:01:27 +0000 (00:01 +0000)]
Checkpoint - ground-net skips the cache

8 years agoRevert "Initialise Qt earlier, and whenever available"
Rebecca N. Palmer [Mon, 30 Nov 2015 23:10:32 +0000 (23:10 +0000)]
Revert "Initialise Qt earlier, and whenever available"

Temporary workaround for
http://sourceforge.net/p/flightgear/codetickets/1819/

This reverts commit 3e67417bf009493f8f2ae1e362b6014028fc3cbf.

8 years agoMerge /u/r-harrison/flightgear/ branch next into next
James Turner [Sun, 29 Nov 2015 21:51:08 +0000 (21:51 +0000)]
Merge /u/r-harrison/flightgear/ branch next into next

http://sourceforge.net/p/flightgear/flightgear/merge-requests/21/

8 years agoFix indentation and use naIsNil to determine if _globals is nil
Richard Harrison [Sun, 29 Nov 2015 18:15:24 +0000 (19:15 +0100)]
Fix indentation and use naIsNil to determine if _globals is nil

8 years agoUse a transaction when indexing polylines.
James Turner [Sun, 29 Nov 2015 14:18:30 +0000 (14:18 +0000)]
Use a transaction when indexing polylines.

8 years agoMove functionality into clear_fg_scenerey helper.
James Turner [Fri, 27 Nov 2015 23:25:53 +0000 (23:25 +0000)]
Move functionality into clear_fg_scenerey helper.

8 years agoRemove some debugs
James Turner [Fri, 27 Nov 2015 23:25:24 +0000 (23:25 +0000)]
Remove some debugs

8 years agoClamp diagram zoom.
James Turner [Fri, 27 Nov 2015 23:25:11 +0000 (23:25 +0000)]
Clamp diagram zoom.

- avoid poor performance and unusable UI when zooming out

8 years agoFix some coastline issues.
James Turner [Thu, 26 Nov 2015 23:44:27 +0000 (23:44 +0000)]
Fix some coastline issues.

8 years agoLauncher shows polygon/polyline data
James Turner [Thu, 26 Nov 2015 16:48:23 +0000 (16:48 +0000)]
Launcher shows polygon/polyline data

8 years agoSHPParser
James Turner [Tue, 24 Nov 2015 22:36:07 +0000 (22:36 +0000)]
SHPParser

8 years agoRemove accidentally duplicated functions.
James Turner [Thu, 26 Nov 2015 16:49:55 +0000 (16:49 +0000)]
Remove accidentally duplicated functions.

8 years agoRemove a stray debug.
James Turner [Wed, 25 Nov 2015 00:15:34 +0000 (00:15 +0000)]
Remove a stray debug.

8 years agoHandle libCurl linkage when enabled in SimGear
James Turner [Thu, 26 Nov 2015 23:40:14 +0000 (23:40 +0000)]
Handle libCurl linkage when enabled in SimGear

Detect if SimGear was built with Curl support,
and if so, find and link against libCurl

9 years agoGraphical picking of parking/helipads too.
James Turner [Tue, 24 Nov 2015 22:14:22 +0000 (22:14 +0000)]
Graphical picking of parking/helipads too.

9 years agoAdd helipad support to the diagram.
James Turner [Tue, 24 Nov 2015 21:46:05 +0000 (21:46 +0000)]
Add helipad support to the diagram.

- stops crashes selecting a heliport.

9 years agoRemove long-obsolete fields
James Turner [Tue, 24 Nov 2015 21:45:44 +0000 (21:45 +0000)]
Remove long-obsolete fields

9 years agoInitial work on rendering parking locations.
James Turner [Tue, 24 Nov 2015 20:58:01 +0000 (20:58 +0000)]
Initial work on rendering parking locations.

9 years agoUse SLOT for both uses of QTimer::singleShot
Rebecca N. Palmer [Tue, 24 Nov 2015 18:40:54 +0000 (18:40 +0000)]
Use SLOT for both uses of QTimer::singleShot

(fix Qt < 5.4 build)

9 years agoFix MSVC2012 build
James Turner [Tue, 24 Nov 2015 15:36:53 +0000 (15:36 +0000)]
Fix MSVC2012 build

- multi-line QStringLiteral doesn’t work on MSVC prior to 2013. Boo.

9 years agoUse old-style SLOT macro for Qtimer::singleShot
James Turner [Tue, 24 Nov 2015 08:05:05 +0000 (08:05 +0000)]
Use old-style SLOT macro for Qtimer::singleShot

- member-function-pointer variant was only added in 5.4

9 years ago{fatal,modal}MessageBox: Use Qt on Linux when available
Rebecca N. Palmer [Tue, 24 Nov 2015 07:24:32 +0000 (07:24 +0000)]
{fatal,modal}MessageBox: Use Qt on Linux when available

(console error messages are invisible when started from an icon)

9 years agoInitialise Qt earlier, and whenever available
Rebecca N. Palmer [Tue, 24 Nov 2015 07:21:52 +0000 (07:21 +0000)]
Initialise Qt earlier, and whenever available

(to allow it to be used for error boxes)

9 years agoChange handling of default hangar / catalog.
James Turner [Mon, 23 Nov 2015 22:58:00 +0000 (22:58 +0000)]
Change handling of default hangar / catalog.

- no longer re-add it on startup, add an explicit button in the UI

(will add a more obvious item to the aircraft list in a follow-up
commit)

9 years agoEnsure aircraft list stays in sync
James Turner [Mon, 23 Nov 2015 17:59:16 +0000 (17:59 +0000)]
Ensure aircraft list stays in sync

- when removing a catalog, use the new notification to refresh
  the list, so we don’t show stale package data.

9 years agoFix merge noise
James Turner [Mon, 23 Nov 2015 01:19:03 +0000 (01:19 +0000)]
Fix merge noise

9 years agoLat-lon startup location fixes.
James Turner [Sat, 21 Nov 2015 00:01:40 +0000 (00:01 +0000)]
Lat-lon startup location fixes.

9 years agoLabels on large airports in the diagram
James Turner [Thu, 19 Nov 2015 21:35:43 +0000 (21:35 +0000)]
Labels on large airports in the diagram

9 years agoCap number of airports displayed in diagrams
James Turner [Tue, 17 Nov 2015 07:36:54 +0000 (07:36 +0000)]
Cap number of airports displayed in diagrams

- restrict heliports / seaports by aircraft type
- prioritise by runway length
- clean up airport label names

9 years agoRemove some debugs.
James Turner [Mon, 16 Nov 2015 00:32:12 +0000 (00:32 +0000)]
Remove some debugs.

9 years agoShow paused message when starting frozen.
James Turner [Sun, 15 Nov 2015 23:56:18 +0000 (23:56 +0000)]
Show paused message when starting frozen.

9 years agoDraw aircraft on airport diagram
James Turner [Sun, 15 Nov 2015 15:55:07 +0000 (15:55 +0000)]
Draw aircraft on airport diagram

9 years agoFix unproject / navaid drawing.
James Turner [Sun, 15 Nov 2015 15:37:22 +0000 (15:37 +0000)]
Fix unproject / navaid drawing.

9 years agoClosed airport support.
James Turner [Sun, 15 Nov 2015 14:48:48 +0000 (14:48 +0000)]
Closed airport support.

9 years agoLabel de-overlapping for diagrams
James Turner [Sun, 15 Nov 2015 13:53:35 +0000 (13:53 +0000)]
Label de-overlapping for diagrams

9 years agoMove airplane drawing into the base class.
James Turner [Sat, 14 Nov 2015 16:46:28 +0000 (16:46 +0000)]
Move airplane drawing into the base class.

- ground work for showing airplane on airport diagram

9 years agoFix Linux compilation issues.
James Turner [Sat, 14 Nov 2015 16:45:04 +0000 (16:45 +0000)]
Fix Linux compilation issues.

9 years agoLocation history re-instaed
James Turner [Fri, 13 Nov 2015 21:54:50 +0000 (21:54 +0000)]
Location history re-instaed

9 years agoFixing launcher save/restore of settings.
James Turner [Thu, 12 Nov 2015 00:11:12 +0000 (00:11 +0000)]
Fixing launcher save/restore of settings.

9 years agoFix for determining towered vs untowered airports.
James Turner [Thu, 12 Nov 2015 00:10:40 +0000 (00:10 +0000)]
Fix for determining towered vs untowered airports.

9 years agoWork on launcher diagrams.
James Turner [Thu, 12 Nov 2015 00:10:06 +0000 (00:10 +0000)]
Work on launcher diagrams.

9 years agoAllow distinguishing un-towered airports.
James Turner [Wed, 11 Nov 2015 17:03:47 +0000 (17:03 +0000)]
Allow distinguishing un-towered airports.

9 years agoFixes to launcher aircraft thumbnail sizing
James Turner [Tue, 10 Nov 2015 23:28:24 +0000 (23:28 +0000)]
Fixes to launcher aircraft thumbnail sizing

- handle large images and longer descriptions correctly

9 years agoFallback when aircraft description is missing.
James Turner [Sat, 26 Sep 2015 17:41:32 +0000 (12:41 -0500)]
Fallback when aircraft description is missing.

- avoids corrupted delegate display caused by asking for
  bounds of empty string.

9 years agoNavaid diagram for launcher
James Turner [Tue, 10 Nov 2015 22:54:57 +0000 (22:54 +0000)]
Navaid diagram for launcher

- work in progress, needs labels

9 years agoLat-lon position support
James Turner [Fri, 6 Nov 2015 05:48:07 +0000 (00:48 -0500)]
Lat-lon position support

9 years agoNavaid diagram work
James Turner [Fri, 6 Nov 2015 05:47:49 +0000 (00:47 -0500)]
Navaid diagram work

9 years agoStart-paused for in-air starts
James Turner [Tue, 3 Nov 2015 22:05:20 +0000 (16:05 -0600)]
Start-paused for in-air starts

9 years agoILS drawing in the airport diagram
James Turner [Tue, 3 Nov 2015 22:05:09 +0000 (16:05 -0600)]
ILS drawing in the airport diagram

9 years agoWork on LocationWidget for Qt launcher
James Turner [Tue, 3 Nov 2015 21:28:36 +0000 (15:28 -0600)]
Work on LocationWidget for Qt launcher

9 years agoLauncher GUI for in-air / navaid starts
James Turner [Sun, 25 Oct 2015 00:40:41 +0000 (19:40 -0500)]
Launcher GUI for in-air / navaid starts

9 years agoWork on the launcher
James Turner [Fri, 16 Oct 2015 01:05:17 +0000 (20:05 -0500)]
Work on the launcher

9 years agoQtLauncher::initApp: store argc to avoid crash
Rebecca N. Palmer [Sun, 22 Nov 2015 21:05:09 +0000 (21:05 +0000)]
QtLauncher::initApp: store argc to avoid crash

As QApplication only stores a reference to argc, it may crash if
the argc passed to it goes out of scope.  (One way to trigger this
is to pass an invalid --fg-root, triggering an initApp call from
Options::setupRoot.)  Copy argc to prevent this.

9 years agoFix for SEGFAULT when using multiple loggers.
Stuart Buchanan [Sun, 22 Nov 2015 17:11:36 +0000 (17:11 +0000)]
Fix for SEGFAULT when using multiple loggers.

Patch from Julian BREITENEICHER.

9 years agofgValidatePath: allow Nasal to read user-set scenery directories
Rebecca N. Palmer [Sun, 22 Nov 2015 11:27:39 +0000 (11:27 +0000)]
fgValidatePath: allow Nasal to read user-set scenery directories

(but not the Terrasync directory, as Nasal can change that)

9 years agofgValidatePath: documentation improvements
Rebecca N. Palmer [Sun, 22 Nov 2015 11:03:00 +0000 (11:03 +0000)]
fgValidatePath: documentation improvements

9 years agoSimplify fgValidatePath + minor fix (requires simgear update)
Rebecca N. Palmer [Sat, 21 Nov 2015 21:37:19 +0000 (21:37 +0000)]
Simplify fgValidatePath + minor fix (requires simgear update)

Drop fgNormalizePath, use realpath() only
As this makes it accept relative paths, always use the returned
(absolute) version for the actual file operation to avoid check-to-use
races, or where this is not possible (NasalSGPath) explicitly reject
relative paths
Fix: do_save is a write, not a read

9 years agoFix some inverted logic
James Turner [Thu, 19 Nov 2015 21:37:03 +0000 (21:37 +0000)]
Fix some inverted logic

- spotted by Thomas Geymayer!

9 years agofgcommand remove-subsystem: fix double delete/segfault.
Thomas Geymayer [Thu, 19 Nov 2015 22:17:58 +0000 (23:17 +0100)]
fgcommand remove-subsystem: fix double delete/segfault.

9 years agoFix enable/disable-freeze option.
James Turner [Fri, 13 Nov 2015 22:01:16 +0000 (22:01 +0000)]
Fix enable/disable-freeze option.

- set /sim/freeze/clock as well as /sim/freeze/master

Fix by Hamza Alloush

9 years agoFix for OSG 3.5
James Turner [Tue, 3 Nov 2015 21:28:46 +0000 (15:28 -0600)]
Fix for OSG 3.5

9 years agoFix a package crash on startup.
James Turner [Fri, 16 Oct 2015 01:05:35 +0000 (20:05 -0500)]
Fix a package crash on startup.

9 years agoDeveloper-warnings
James Turner [Mon, 28 Sep 2015 20:12:46 +0000 (15:12 -0500)]
Developer-warnings

- make some existing warnings developer-mode only
- add a warning about legacy aircraft path usage

9 years agoRemove OldGNUInstallDirs helper
James Turner [Mon, 28 Sep 2015 20:12:07 +0000 (15:12 -0500)]
Remove OldGNUInstallDirs helper

- we require CMake 2.8.11 now

9 years agoFix permissions
Erik Hofman [Tue, 10 Nov 2015 15:15:42 +0000 (16:15 +0100)]
Fix permissions

9 years agoRename EnvironmentFX to SceneFX and rethink the aircraft model specific properties...
Erik Hofman [Thu, 5 Nov 2015 14:31:52 +0000 (15:31 +0100)]
Rename EnvironmentFX to SceneFX and rethink the aircraft model specific properties: use a samping factor which applies to both volume and reference_distance and max_distance

9 years agoAdd Nasal bindings
Erik Hofman [Wed, 4 Nov 2015 13:37:41 +0000 (14:37 +0100)]
Add Nasal bindings

9 years agoFirst implementation of an environment audio fx module
Erik Hofman [Tue, 3 Nov 2015 13:51:01 +0000 (14:51 +0100)]
First implementation of an environment audio fx module

9 years agoevent input system: be a little more helpful on errors
Torsten Dreyer [Mon, 2 Nov 2015 10:42:30 +0000 (11:42 +0100)]
event input system: be a little more helpful on errors

9 years agoSync. with JSBSim again
Erik Hofman [Fri, 30 Oct 2015 09:10:01 +0000 (10:10 +0100)]
Sync. with JSBSim again

9 years agonewnavradio: expose localizer crosstrack error
Torsten Dreyer [Thu, 8 Oct 2015 08:17:27 +0000 (10:17 +0200)]
newnavradio: expose localizer crosstrack error

9 years agoUse SGPath::realpath() on the value supplied for --aircraft-dir
Florent Rougon [Tue, 6 Oct 2015 10:20:54 +0000 (12:20 +0200)]
Use SGPath::realpath() on the value supplied for --aircraft-dir

* Before setting /sim/aircraft-dir from the --aircraft-dir option,
canonicalize its value with SGPath::realpath() as is already done in
FGGlobals::append_aircraft_path() for the paths given with --fg-aircraft
or via the FG_AIRCRAFT environment variable.

* This fixes a bug when --aircraft-dir is used, due to the fact that
fgValidatePath() canonicalizes its 'path' argument before matching it
against the allowed patterns, and therefore will not validate paths
under the directory specified with --aircraft-dir if this directory has
been given in a non-canonical form by the user (e.g., containing at
least one symlink component).

* This fix does not lower security: the path which is canonicalized has
been explicitely given by the user. This operation is already done for
all paths specified with --fg-aircraft or via the FG_AIRCRAFT
environment variable, via Options::initPaths() which calls
FGGlobals::append_aircraft_paths().

* To reproduce the bug, create a symlink (e.g., /tmp/aircrafts) to a
directory suitable for --fg-aircraft, then run:

  fgfs ... --fg-aircraft=/tmp/aircrafts \
           --aircraft-dir=/tmp/aircrafts/SenecaII --aircraft=SenecaII

This will trigger many failures such as:

  loadxml: reading '/tmp/aircrafts/SenecaII/Dialogs/registration.xml'
  denied (unauthorized directory - authorization no longer follows
  symlinks; to authorize reading additional directories, add them to
  --fg-aircraft)

(from do_load_xml_to_proptree() in flightgear/src/Main/fg_commands.cxx)

I have also tested this with the ec130b4 and the 777-200ER. Same
problem, same fix.

9 years agoRemove some debug noise
James Turner [Mon, 28 Sep 2015 04:13:18 +0000 (23:13 -0500)]
Remove some debug noise

9 years agoSilence more Clang (Xcode 7) warnings
James Turner [Mon, 28 Sep 2015 01:40:34 +0000 (20:40 -0500)]
Silence more Clang (Xcode 7) warnings

9 years agoKeep in sync with SimGear Package API
James Turner [Mon, 28 Sep 2015 00:44:39 +0000 (19:44 -0500)]
Keep in sync with SimGear Package API

9 years agoCorrect handling of updating packages
James Turner [Mon, 28 Sep 2015 00:44:29 +0000 (19:44 -0500)]
Correct handling of updating packages

9 years agoDisable mouse hover code for now.
James Turner [Mon, 28 Sep 2015 00:43:50 +0000 (19:43 -0500)]
Disable mouse hover code for now.

9 years agoDon't load resources for the current aircraft from several aircraft dirs
Florent Rougon [Fri, 25 Sep 2015 22:04:28 +0000 (00:04 +0200)]
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.

9 years agoUse +=, not (5.5+ only) append, for concatenating QVectors
Rebecca N. Palmer [Mon, 21 Sep 2015 21:12:24 +0000 (22:12 +0100)]
Use +=, not (5.5+ only) append, for concatenating QVectors