don't use printlog before nasal-dir-initialized
Thanks, Anders.
This commit is contained in:
parent
b780ade69e
commit
e7e8ac84f2
2 changed files with 14 additions and 12 deletions
|
@ -26,8 +26,8 @@ updateContrail = func{
|
||||||
|
|
||||||
### Contrail
|
### Contrail
|
||||||
|
|
||||||
printlog ("debug", "init contrail");
|
|
||||||
_setlistener("/sim/signals/nasal-dir-initialized", func {
|
_setlistener("/sim/signals/nasal-dir-initialized", func {
|
||||||
|
printlog ("debug", "init contrail");
|
||||||
props.globals.initNode("environment/pressure-inhg", 1, "DOUBLE");
|
props.globals.initNode("environment/pressure-inhg", 1, "DOUBLE");
|
||||||
props.globals.initNode("environment/temperature-degc", 1, "DOUBLE");
|
props.globals.initNode("environment/temperature-degc", 1, "DOUBLE");
|
||||||
props.globals.initNode("environment/contrail", 1, "BOOL");
|
props.globals.initNode("environment/contrail", 1, "BOOL");
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
_setlistener("/sim/presets/latitude-deg", func {
|
_setlistener("/sim/signals/nasal-dir-initialized", func {
|
||||||
printlog("info", "*** NEW LOCATION ***");
|
_setlistener("/sim/presets/latitude-deg", func {
|
||||||
settimer(func {
|
printlog("info", "*** NEW LOCATION ***");
|
||||||
var typ = getprop("/sim/type");
|
settimer(func {
|
||||||
var lat = getprop("/position/latitude-deg");
|
var typ = getprop("/sim/type");
|
||||||
var lon = getprop("/position/longitude-deg");
|
var lat = getprop("/position/latitude-deg");
|
||||||
var g = geodinfo(lat, lon);
|
var lon = getprop("/position/longitude-deg");
|
||||||
if ((g != nil and g[1] != nil and g[1].solid) and (typ == "seaplane") )
|
var g = geodinfo(lat, lon);
|
||||||
fgcommand("dialog-show", props.Node.new({ "dialog-name": "seaport" }));
|
if ((g != nil and g[1] != nil and g[1].solid) and (typ == "seaplane") )
|
||||||
}, 8);
|
fgcommand("dialog-show", props.Node.new({ "dialog-name": "seaport" }));
|
||||||
}, 1);
|
}, 8);
|
||||||
|
}, 1);
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in a new issue