refresh "enabled" state of aircraft views (or they'd last only until the next run)
This commit is contained in:
parent
b8b665d347
commit
59e51fa533
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue