make sure aircraft don't use reserved view indices (0..99)
I tried it the nice way, but it didn't work. Why is it important to reserve indices for fgfs? Because someone has otherwise to go through all aircraft in CVS and move aircraft specific views out of the way, every time a system view gets added. Been there, done that.
This commit is contained in:
parent
96c76c4fe0
commit
d6be4c8303
1 changed files with 10 additions and 0 deletions
|
@ -448,6 +448,16 @@ 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***");
|
||||
}
|
||||
}
|
||||
|
||||
fovProp = props.globals.getNode("/sim/current-view/field-of-view");
|
||||
point.init();
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue