From 4db50617ca7ba9aeb83fe64f26eb93ed2a424aae Mon Sep 17 00:00:00 2001 From: Julian Smith Date: Fri, 29 Jan 2021 16:48:13 +0000 Subject: [PATCH] Added 'Still View', a new core view, number 8. This view is like Helicopter View except that it does not change the view heading to match the aircraft, which makes it work much better for vertical flight, e.g. with the shuttle. The new view is disabled by default. Nasal/view.nas contains the new view config. defaults.xml: Added view 8 to list of views for which we default to Helicopter view's target offsets (so that they look at the centre of the aircraft). --- Nasal/view.nas | 4 ++-- defaults.xml | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Nasal/view.nas b/Nasal/view.nas index 7a78e58d0..0dc47a83c 100644 --- a/Nasal/view.nas +++ b/Nasal/view.nas @@ -276,7 +276,7 @@ var manager = { # this allows Tower View AGL to work on aircraft that don't # know about it but need non-zero target-*-offset-m values # to centre the view on the middle of the aircraft. - if (i==2 or i==3 or i==5 or i==7) { + if (i==2 or i==3 or i==5 or i==7 or i==8) { set_default(helicopter_view, "config/target-x-offset-m", viewnode); set_default(helicopter_view, "config/target-y-offset-m", viewnode); set_default(helicopter_view, "config/target-z-offset-m", viewnode); @@ -963,7 +963,7 @@ var fdm_init_listener = setlistener("/sim/signals/fdm-initialized", func { var zoffset = nil; foreach (var v; views) { var index = v.getIndex(); - if (index > 7 and index < 100) { + if (index > 8 and index < 100) { globals["view"] = nil; die("\n***\n*\n* Illegal use of reserved view index " ~ index ~ ". Use indices >= 100!\n*\n***"); diff --git a/defaults.xml b/defaults.xml index f99437f42..e6e848057 100644 --- a/defaults.xml +++ b/defaults.xml @@ -708,6 +708,19 @@ Started September 2000 by David Megginson, david@megginson.com 2.2 + + + Still View + false + lookat + + false + true + + + true