Fix virtual cockpit toggle binding ("c"). Switches between 2D/3D mode on the
fly.
This commit is contained in:
parent
03eaf08ea2
commit
88d1598ab9
2 changed files with 10 additions and 3 deletions
12
keyboard.xml
12
keyboard.xml
|
@ -660,10 +660,16 @@ calculated by adding 256 to the GLUT key value in glut.h.
|
|||
<command>nasal</command>
|
||||
<script>
|
||||
if(getprop("/sim/allow-toggle-cockpit")) {
|
||||
setprop("/sim/current-view/heading-offset-deg", 0);
|
||||
setprop("/sim/current-view/pitch-offset-deg", 0);
|
||||
setprop("/sim/view/internal", !getprop("/sim/view/internal"));
|
||||
setprop("/sim/current-view/internal", !getprop("/sim/current-view/internal"));
|
||||
setprop("/sim/view/internal", getprop("/sim/current-view/internal"));
|
||||
setprop("/sim/virtual-cockpit", !getprop("/sim/virtual-cockpit"));
|
||||
if(getprop("/sim/current-view/internal")) {
|
||||
setprop("/sim/current-view/heading-offset-deg", getprop("/sim/current-view/config/heading-offset-deg"));
|
||||
setprop("/sim/current-view/pitch-offset-deg", getprop("/sim/current-view/config/pitch-offset-deg"));
|
||||
} else {
|
||||
setprop("/sim/current-view/heading-offset-deg", 0);
|
||||
setprop("/sim/current-view/pitch-offset-deg", 0);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
|
|
|
@ -94,6 +94,7 @@ Started September 2000 by David Megginson, david@megginson.com
|
|||
|
||||
<number-views type="int">6</number-views>
|
||||
<chase-distance-m type="double">-25.0</chase-distance-m>
|
||||
<allow-toggle-cockpit type="bool">false</allow-toggle-cockpit>
|
||||
|
||||
<!-- "tower" positioned to right of runway at KSFO -->
|
||||
<tower>
|
||||
|
|
Loading…
Reference in a new issue