1
0
Fork 0

refresh "enabled" state of aircraft views (or they'd last only until the next run)

This commit is contained in:
mfranz 2007-11-19 18:07:30 +00:00
parent b8b665d347
commit 59e51fa533

View file

@ -453,13 +453,14 @@ var fovProp = nil;
_setlistener("/sim/signals/nasal-dir-initialized", func {
views = props.globals.getNode("/sim").getChildren("view");
# make sure aircraft don't use reserved view indices (0..99)
foreach (var v; views) {
var index = v.getIndex();
if (index > 6 and index < 100) {
globals["view"] = nil;
die("\n***\n*\n* Illegal use of reserved view index "
~ index ~ ". Use indices >= 100!\n*\n***");
} elsif (index >= 100 and index < 200) {
settimer(func { aircraft.data.add(v.getPath() ~ "/enabled") }, 0);
}
}