From 0cd3549867d94f74fa5340a474d83bbd759b648b Mon Sep 17 00:00:00 2001 From: Josh Davidson Date: Mon, 8 Nov 2021 10:44:58 -0500 Subject: [PATCH] Sim: fix view controller to whitelist --- Nasal/Libraries/property-tree-setup.nas | 1 - Nasal/Libraries/zoom-views.nas | 4 +--- revision.txt | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Nasal/Libraries/property-tree-setup.nas b/Nasal/Libraries/property-tree-setup.nas index 07719232..406bcf12 100644 --- a/Nasal/Libraries/property-tree-setup.nas +++ b/Nasal/Libraries/property-tree-setup.nas @@ -251,7 +251,6 @@ var Sim = { name: props.globals.getNode("/sim/current-view/name", 1), pitchOffsetDeg: props.globals.getNode("/sim/current-view/pitch-offset-deg", 1), rollOffsetDeg: props.globals.getNode("/sim/current-view/roll-offset-deg", 1), - type: props.globals.getNode("/sim/current-view/type", 1), viewNumberRaw: props.globals.getNode("/sim/current-view/view-number-raw", 1), zOffsetDefault: props.globals.getNode("/sim/current-view/z-offset-default", 1), xOffsetM: props.globals.getNode("/sim/current-view/x-offset-m", 1), diff --git a/Nasal/Libraries/zoom-views.nas b/Nasal/Libraries/zoom-views.nas index 62cd2ea0..62c5f8c0 100644 --- a/Nasal/Libraries/zoom-views.nas +++ b/Nasal/Libraries/zoom-views.nas @@ -8,11 +8,9 @@ var max_dist = 0; var canChangeZOffset = 0; var decStep = -5; var incStep = 5; -var viewName = "XX"; var fovZoom = func(d) { - viewName = pts.Sim.CurrentView.name.getValue(); - canChangeZOffset = pts.Sim.CurrentView.type.getValue() == "lookat" and viewName != "Tower View" and viewName != "Fly-By View" and viewName != "Chase View" and viewName != "Chase View Without Yaw" and viewName != "Walk View"; + canChangeZOffset = pts.Sim.CurrentView.name.getValue() == "Helicopter View"; if (pts.Sim.CurrentView.zOffsetM.getValue() <= -50) { decStep = -10; diff --git a/revision.txt b/revision.txt index 2e66562e..c5b431b6 100644 --- a/revision.txt +++ b/revision.txt @@ -1 +1 @@ -49 \ No newline at end of file +50 \ No newline at end of file