Patch to enable atc chatter (and any other arbitrary "message" audio file)
to be played at any specified volume. (Previously these messages were always
played at a hardcoded volume of 1.0)
- save pairs of <file>/<path> for each *-set.xml file in autosave.xml
- loop up file name in the cache at startup. If it's found, check if the
file exists and use it, otherwise scan $FG_ROOT/Aircraft/ as usual,
and create a new cache while doing that. Rebuild cache on FG_ROOT change.
- move fgInitTowerLocationListener() from fgInitPosition() to the init
part of fgIdleFunction() in main.cxx. fgInitPosition() is called again
at every reset, which would every time attach another listener.
setAttribute("archive", 1) sets this attribute to "true", and
getAttribute("archive") returns 1 if the attribute is set, and 0 otherwise.
Allow to query and to set all properties by not specifying an attribute
string: getAttribute() returns all attributes bit coded in an integer,
and setAttribute(attr) sets all attributes. No assumptions may be made
about the meaning of the bits -- they can be changed in future fgfs releases.
The only valid use is to compare or set attribute numbers obtained in the
same fgfs run. This is meant for allowing full copies of property branches.
Also add getAttribute query strings "children" for the number of children,
and "alias".
Csaba "Jester" HALASZ: radar fix & extension
- fix breakage due to former commit (AIManager.cxx, r1.72)
- make AI properties available in AIBase
- add <valid> property for animations/nasal scripts
- support more MP and AI targets
- add target select and altitude display
Csaba HALASZ: don't treat every entry in a scenario file as model entry,
especially those called <description>. This was responsible for the aircraft
at --lon=0 --lat=0.
allow AI models to contain <nasal><load> and <nasal><unload> blocks in
their XML wrapper/animation file. They can access their /ai/models node
via cmdarg() function. Example:
<nasal>
<load>
print("Hi, I'm the Nimitz. My data are under ",
cmdarg().getPath());
</load>
<unload>
...
</unload>
</nasal>
Note, however, that the <unload> block is only called on exit at the moment,
not when the tile is unloaded.
mfranz [Fri, 30 Mar 2007 22:51:52 +0000 (22:51 +0000)]
Vivian MEAZZA:
"""
"Flight plans" which can start at a given time (gmt)
WAITUNTIL tokens which pause the flight plans until a given time (gmt)
Submodels can now be attached to any AI objects (except submodels - it can
be done, but in my experimental code it's too expensive in frame rate atm)
"No-roll" attribute added to Ballistic objects - useful for wakes and the
like
"Random" attribute added to Ballistic objects (adds =- 5% to the Cd) -
useful for smoke, exhausts
If the <trigger> tag is not specified the Ballistic object/s will be
released at start-up (cannot be stopped)
Submodels are not released from AI Objects if the AI Object is more than 15
miles away.
"""
mf: minor code and formatting fixes; submodels.?xx were FUBAR and are thus
astyle formatted;
NOTE that <name> tags END, EOF, WAIT, WAITUNTIL are *depreciated*.
Don't get too used to them. This will have to be moved from the "name"
to regular engries.
andy [Thu, 29 Mar 2007 18:50:28 +0000 (18:50 +0000)]
Sync with Nasal CVS (soon to become Nasal 1.1). Notable new features:
Nasal now supports calls to "subcontexts" and errors can be thrown
across them, leading to complete stack traces when call() is used,
instead of the truncated ones we now see.
Vectors can now be concatenated using the ~ operator that used to work
only for strings.
Better runtime error messages in general due to a fancier
naRuntimeError() implementation
A big data size shrink on 64 bit systems; the size of a naRef dropped
by a factor of two.
"Braceless code blocks" have been added to the parser, so you can
write expressions like "if(a) b();" just like in C. Note that there's
still a parser bug in there that fails when you nest a braced block
within a braceless one.
Character constants that appear in Nasal source code can now be
literal multibyte UTF8 characters (this was always supported for
string literals, but character constants were forced to be a single
byte).
New modules: "bits", "thread", "utf8" and (gulp...) "io". The bits
library might be useful to FlightGear, the utf8 one probably not as
Plib does not support wide character text rendering. The thread
library will work fine for spawning threads to do Nasal stuff, but
obviously contact with the rest of FlightGear must be
hand-synchronized as FlightGear isn't threadsafe. The io library is
no doubt the most useful, as it exposes all the basic stdio.h
facilities; it's also frighteningly dangerous when combined with
networked code...
mfranz [Mon, 26 Mar 2007 15:17:38 +0000 (15:17 +0000)]
layout-props.cxx: hrule/vrule shall be accepted as widgets even if they
have no children (in which case they default to 1px thickness & stretch).
This allows to just write <hrule/> instead of <hrule><dummy/></hrule>.
One can still use <hrule><pref-height>3</pref-height></hrule>, of course.
layout.cxx: drop silly do??Box calls for hrule/vrule (yes, I wrote that :-)
mfranz [Fri, 23 Mar 2007 15:53:58 +0000 (15:53 +0000)]
If text contains "{display|voice}" groups, skip the delimiters and
discard the display part. The curly braces wouldn't be spoken anyway,
and the | would be spoken as "vertical bar", which is completely
useless (which is why it had been disabled in the past already).
mfranz [Sat, 17 Mar 2007 15:58:15 +0000 (15:58 +0000)]
New Nasal command _condition(p) where p is a property node containing
a condition as described in $FG_ROOT/Docs/README.condition. Returns 1 if
condition is true, 0 if false, and nil on error.
mfranz [Sat, 10 Mar 2007 20:46:38 +0000 (20:46 +0000)]
before a day passes with no commits at all, better have some fg-submit stuff :-)
- drop the DEFAULT keyword in .fg-submit configuration files. That was
a silly idea. The default rules are now always appended. One can still
bypass them by ALLOWing or DENYing anything before, for example, by using
DENY *, or ALLOW *.
- fix a typo that broke ~/.fg-submitrc loading (but ~/.fg-submit worked anyway)
- some minor improvments, cleanup and all that
mfranz [Fri, 9 Mar 2007 19:15:54 +0000 (19:15 +0000)]
yeah, yet another patch ... :-]
- fix config file name in $HOME; This didn't match the documentation.
(doesn't cost us anything to check ~/.fg-submit first, and then ~/.fg-submitrc)
- don't use mktemp for the backup files. Some outdated distributions
(Debian) come with a version that mandates six X, which is just too ugly.
Just find the first free slot with sequential number. That isn't thread
safe, but mktemp isn't either, so ... (Should be using "lockfile", but
its availability on CygWin is questionable. And it's not *that* important.)
- some more documentation
- some cleanup, too, of course
mfranz [Fri, 9 Mar 2007 16:22:27 +0000 (16:22 +0000)]
- rules can be defined in optional .fg-submit config files, via commands
ALLOW, DENY, IGNORE, DEFAULT ... see documentation on top
- make fg-upload arguments like the documentation says. (I had accidentally
left $1=$PWD, $2=archive, $3=diff, while it should be $1=archive, $2=diff)
- add -v option (verbose)
mfranz [Thu, 8 Mar 2007 23:16:57 +0000 (23:16 +0000)]
- escape '+' in awk pattern (gawk doesn't need it, but mawk does)
- change the mktemp lines to please Debian's stoneage version ... sigh
- reject archives
mfranz [Thu, 8 Mar 2007 16:45:48 +0000 (16:45 +0000)]
fg-check: speedup, minor fixes, cleanup
fg-submit:
- takes alternative optional basename (used instead of dirname)
- calls optional user defined fg-upload script at the end (example on top)
- minor fixes, different color for changed binary files
- cleanup, improved documentation
mfranz [Wed, 7 Mar 2007 16:26:33 +0000 (16:26 +0000)]
- add fg-check script; Can be used to check source/data before committing or
submitting. Detects various kinds of ugliness, but also reports false
positives. (People aren't supposed to compress texture filer so save
40 bytes. ;-)
- bugfix in fg-submit + some more cleanup and cosmetics
mfranz [Tue, 6 Mar 2007 21:48:28 +0000 (21:48 +0000)]
don't move existing diff/tar.bz2 file away asking if it's ok to overwrite,
but rather copy the files to mktemp generated & guaranteed unique files
(don't worry, this is the last patch for today :-)
mfranz [Mon, 5 Mar 2007 21:40:39 +0000 (21:40 +0000)]
Vivian MEAZZA:
"Implement 'flightplans' for AIShips. This patch also introduces the concept
of a 'WAIT' token for AIShips: when the flightplan reaches a 'WAIT', the
AIShip stops and pauses for the specified time (secs)."
mfranz [Thu, 1 Mar 2007 17:53:24 +0000 (17:53 +0000)]
Hans Ulrich NIEDERMANN:
"""
Fix Y2K bug triggering string overflow
sim_control_.date_string is a char[7], so it can contain "yymmdd" and
the terminating '\0'. However, nowtime->tm_year is 107 for the year 2007,
so you'll end up with a 7 digit number and the string written to
sim_control_.date_string is longer than sim_control_.date_string is.
Ouch!
"""
mf: ... and sim_control_.date_string isn't even used.
frohlich [Wed, 14 Feb 2007 17:51:23 +0000 (17:51 +0000)]
Modified Files:
src/Navaids/awynet.cxx src/Navaids/awynet.hxx: Olaf Flebbe:
Implement ~FGAirwayNetwork, though it is not called now
Guard snprint properly.
frohlich [Tue, 6 Feb 2007 05:32:24 +0000 (05:32 +0000)]
Modified Files:
src/Main/renderer.cxx: Avoid an additional camera.
Guard the plain OpenGL drawables better.
This change now requires the new osg tarball or osg cvs.
frohlich [Wed, 31 Jan 2007 20:43:10 +0000 (20:43 +0000)]
Modified Files:
src/Main/util.cxx: Olaf Flebbe: flush the osgDB cache just before
exit. This avoids a static destructor cleanup problem with static
osg linkage.
mfranz [Sun, 28 Jan 2007 12:16:37 +0000 (12:16 +0000)]
don't truncate strings output by print() to 1024 bytes. This was apparently
done for performance reasons, but print() should be able to output any
valid string, and when SG_LOG uses strings and streams already, then we
can use that here, too. (Not discussed with Andy yet.)
mfranz [Tue, 23 Jan 2007 15:53:04 +0000 (15:53 +0000)]
- remove "nasal-dir-initialized" signal node after use. This code is executed
before the property tree is stored away for reinit, so the signal would
be emitted again on reset.
- fix inconsistent style that sneaked in with a previous patch