1
0
Fork 0
Commit graph

494 commits

Author SHA1 Message Date
ThorstenB
a3e76909ee Christoph Korn/PlayDeb.net: fix typos 2012-08-17 23:51:30 +02:00
ThorstenB
df4ccc3b88 Debug message about loaded AI models. 2012-07-15 10:15:53 +02:00
James Turner
b0384d035f Remove remaining includes of simgear/waypoint 2012-05-11 23:49:12 +01:00
Frederic Bouvier
75fc136931 Remove redundant inclusion of math/SGMath.hxx 2012-05-05 11:20:04 +02:00
ThorstenB
0f462d4a6e Fix rpmlint/Linux packager complaints
about outdated/invalid FSF address in some license headers.
2012-05-05 01:42:41 +02:00
ThorstenB
b9260f543b Ganael Laplanche: fix include dependencies for FreeBSD support 2012-05-05 01:08:20 +02:00
ThorstenB
e59fabaf82 Clean-up some SGMath dependencies. 2012-05-05 00:56:29 +02:00
ThorstenB
3986e1fe3a Add separate switch to enable/disable AI scenario support.
Switch is enabled automatically when scenarios are given on command-line.
2012-04-30 19:04:49 +02:00
ThorstenB
9b51c5e87e #248: support enabling AI module at run-time
Also adapt MP and traffic module to enable the AI module when required.
This makes /sim/ai/enabled an internal property: it can default to false
(in future), and can be enabled as soon as any user-level feature (traffic,
MP, local weather, ...) requires it.
2012-04-30 17:26:04 +02:00
ThorstenB
89b41395d8 Move viewer-related sources to separate folder.
Simple source directory clean-up, so "Main" folder contains fewer stuff
and the list of files in the editors a lot shorter.
2012-04-25 23:28:00 +02:00
ThorstenB
d683d39e85 Fix SceneryPager destruction sequence.
SceneryPager singleton must not be removed while FGScenery is still alive,
so hold a reference to it in FGScenery, saving the pager from being
deleted first.
2012-04-15 15:30:44 +02:00
ThorstenB
ffe7149b81 Don't call "exit" when reporting an error.
Add some more guards for missing way points.
Comment out some unused variables.
2012-04-12 19:38:32 +02:00
ThorstenB
c14343d02b AIFlightPlan: Initialize the same member variables in all constructors.
distance_to_go / lead_distance were not initialized in all constructors.
Fixes 'condition on uninitialized data' reported by valgrind.
Also comment-out unused vars.
2012-03-26 21:11:03 +02:00
ThorstenB
11a9bdf29e #548: segfault in AIFlightPlanCreate
check "tn != NULL" before calling tn->getGeod()
2012-03-25 10:34:07 +02:00
ThorstenB
0abf252ec8 Use tiedPropertyLists instead of manually matched tie/untie calls.
Ensures we don't forget to untie some individual properties.
2012-03-04 15:30:08 +01:00
ThorstenB
578df0f484 #553: decouple OSG callbacks from Nasal subsystem 2012-02-06 22:19:33 +01:00
ThorstenB
246feef85f #553: MP-model-loading related segfault
MP aircraft are loaded by a separate OSG thread (introduced after FG2.4.0).
The OSG thread also calls the "modelLoaded" callback. However, we mustn't
allow the OSG thread to call FGNasalModelData::modelLoaded directly:
FGNasalModelData isn't thread-safe. There are obvious issues (_callCount++;),
tricky issues like calling the Nasal _parser_ or creating hashes and
modifying the global Nasal namespace. It doesn't use locks to protect
against another thread executing a Nasal context or running garbage
collection. It also executes Nasal code itself (the model's "load" hook),
which we also cannot allow in a separate thread...
This patch returns all Nasal parts of MP-aircraft loading (parsing,
module creation, execution) to the main thread, while keeping the
multi-threaded OSG part (loading of MP-aircraft model files itself).
The same issue exists with scenery models (see other commit).

To summarize with 2 words: It s*cks... ;-)
2012-01-08 13:28:49 +01:00
ThorstenB
dac00efbc7 Fix some compiler warnings.
Comment out unused code.
2012-01-02 23:16:17 +01:00
Durk Talsma
aab04f44bd Bugfixes and some finetuning:
* Pregenerating taxiroutes could interfere with runway assignments by ATC, when conditions changed, resulting in a taxi to one runway and a takeoff from another
* A simpler solution for the "Error in Traffic record bug". This still needs some more testing, but I haven't seen any error message anymore, since changing to the current code.
* Initialize AI traffic at speed zero, this should prevent some weirdness observed under boundary conditions.
* Don't activate groundnetwork proximity detection for pushback traffic until the "ready for startup message is transmitted. this should allow sufficient time for them to reserve a route, but a little more testing still needs to be done.
2012-01-02 22:23:24 +01:00
Torsten Dreyer
ddb4fa050f Some warning fixes, mostly unused variables 2011-12-25 14:41:47 +01:00
Erik Hofman
1fb790eb60 comment out unused variables and function and properly initialize variables 2011-12-19 16:50:21 +01:00
Erik Hofman
c78b7e1abb Remove AI prefix for the sound path and add it to the config files instead 2011-12-14 12:45:22 +01:00
ThorstenB
d47342a5a4 Add --log-class option, improve logging classes.
Replace SG_GENERAL by more specific log classes in many places.
Allow "," to separate logging classes (using "|" is odd on the
command-line).
Also add new option to make logging more useful for developers.
You can use:
  --log-level=debug --log-class=environment
to only get environment debug messages, or
  --log-level=debug --log-class=sound,ai
to only get debug messages related to the sound or AI subsystem.
2011-12-11 14:06:17 +01:00
ThorstenB
444720f62d Avoid useless warnings during FG startup.
Do not warn about missing scenery manager, unless it is really needed.
Also raise warn level for multiple init calls.
2011-12-09 17:19:45 +01:00
ThorstenB
826107f132 #510: Fix disappearing AIShips.
Untangle AI reinit and init methods. Some code in init hooks expects to be
called once only. Derived classes should not redirect their reinit to init,
even if this seems fine for the methods of the derived class itself. This
also triggers the init methods of all base classes, which may not expect
multiple calls to their init methods (or to "init" on "reinit").
2011-12-09 17:06:19 +01:00
ThorstenB
bfb0619f76 Fix memory leak with FGAIModelData.
Be lazy and use ref pointers - to remove memory automatically.
2011-12-09 17:03:14 +01:00
Vivian Meazza
6b1391e404 Make parameter "roll-factor" settable in scenario files
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2011-12-04 19:10:42 +01:00
ThorstenB
07aa70dce9 sound: fix sound-buffer-in-use issue
FGFX objects must be dereferenced early enough, and sound manager must be
removed late enough - otherwise openal complains about resources being
still in use when tryin to remove buffers.
Also: do not create FGFX objects for AI/MP aircraft, when AI sound is
disabled.
2011-12-04 17:18:02 +01:00
Erik Hofman
831f81d97c Properly construct a string from another string and an integer, use a relative path for sound construction, allow enable/disable aimodel sounds using /sim/sound/aimodels/enabled 2011-12-03 14:40:48 +01:00
Erik Hofman
99bb79c7d5 Properly remove FGFX classes when not needed anymore 2011-11-27 15:10:44 +01:00
Erik Hofman
f89ad9baf0 Move some code from the header file to the source file. 2011-11-27 13:48:04 +01:00
Erik Hofman
2c8da4c122 fix a typo 2011-11-27 10:52:28 +01:00
Erik Hofman
ebcc6359b9 Initials sound support for AI models. 2011-11-25 13:39:10 +01:00
Erik Hofman
04395fa9a5 Postpone initialization of the avionics soundgroup until avionics are enabled. This prevents AI classes from creating new and unnecessary avionics sample groups. 2011-11-20 15:31:58 +01:00
Erik Hofman
544bad86c7 remove a .swp file 2011-11-20 15:06:10 +01:00
Erik Hofman
9e1121fc4c First implementation of sound effects for AI models. 2011-11-20 15:05:37 +01:00
ThorstenB
4b2506d709 Add new performance monitoring subsystem.
Rename some subsystems for naming consistency.
2011-11-19 15:37:49 +01:00
Durk Talsma
4903556bb2 Enable the AI pilot to hit the breaks hard when necessary. 2011-11-12 18:42:59 +01:00
Durk Talsma
0905b4f367 Fixing an age old bug. AIAircraft arriving on an airport never received a proper gateId, causing them to taxi to the end of the world and beyond. 2011-11-12 18:40:23 +01:00
ThorstenB
1eb8d0caa4 #424: Don't page out AI objects. Just load lazily.
Changes commit 1e7d072eed and uses the new
deferred loading - instead of paged (un)loading.
2011-11-10 22:12:54 +01:00
James Turner
70b4f38ebc Goodbye automake. 2011-11-01 11:15:53 +00:00
Durk Talsma
8eca759077 Merge branch 'next' of gitorious.org:fg/flightgear into next 2011-10-26 22:38:38 +02:00
Durk Talsma
538e632f45 * Updated routing algorithm. Just sorting the schedules by usage heuristics doesn't work well for major multihub airlines.
* Improved groundnetwork routing algorithm. Don't uncesscarily block taxiways. Instead, use a "just-in-time" blocking system. The unblocking algorithm still needs some work, but the current version is already a major improvement over the previous version.
* Some tweaks to the handover from ground to tower controller. Aircraft could refuse to take-off of even refuse to taxi onto the runway. This now seems to be solved.
2011-10-26 22:26:37 +02:00
James Turner
16a54a4409 Change a hot-spot in the AI code, to use cartesian instead of geodetic math. 2011-10-26 17:26:11 +01:00
Frederic Bouvier
8057c50849 AITraffic fix - forgot two files 2011-10-22 10:31:38 +02:00
Frederic Bouvier
3a262fe7d3 Fix a problem in AITraffic where waypoint iterator is trashed by push_back. A cleaner solution would be to use indices instead of iterators to track position in the waypoint vector 2011-10-22 10:15:16 +02:00
James Turner
b1b4b7ecf4 Fix (nearly) all the std:: namespace violations in headers, in preparation for fixing SGsmplstat.hxx to *not* do a 'using namespace std'. 2011-10-17 17:41:59 +01:00
ThorstenB
b16338598a Use more specific log classes.
Log class filters work better when different modules
use different classes :).
2011-10-11 21:55:50 +02:00
ThorstenB
53e6c0ac5f Reduce AI/MP lags when removing models
Move load of removing OSG objects to the OSG pager thread
2011-10-11 21:43:24 +02:00
Durk Talsma
835334bd4f Finetuning of AI Aircraft landing performance. Aircraft slow down to taxi speeds just before leaving the runway. Increased vTaxi on the runway to further reduce time on the runway and slow down to vTouchdown well ahead of touching down. 2011-10-10 21:55:09 +02:00