Nasal/view.nas: Honour the configured directional offsets on view reset.
Thanks to Patrick Melanson, who noticed the problem and suggested the solution.
This commit is contained in:
parent
16d8e498ad
commit
7b277810a8
1 changed files with 4 additions and 6 deletions
|
@ -80,12 +80,10 @@ var resetViewPos = func {
|
|||
}
|
||||
|
||||
var resetViewDir = func {
|
||||
setprop("/sim/current-view/goal-heading-offset-deg",
|
||||
getprop("/sim/current-view/config/heading-offset-deg"));
|
||||
setprop("/sim/current-view/goal-pitch-offset-deg",
|
||||
getprop("/sim/current-view/config/pitch-offset-deg"));
|
||||
setprop("/sim/current-view/goal-roll-offset-deg",
|
||||
getprop("/sim/current-view/config/roll-offset-deg"));
|
||||
var v = current.getNode("config");
|
||||
setprop("/sim/current-view/heading-offset-deg", v.getNode("heading-offset-deg", 1).getValue() or 0);
|
||||
setprop("/sim/current-view/pitch-offset-deg", v.getNode("pitch-offset-deg", 1).getValue() or 0);
|
||||
setprop("/sim/current-view/roll-offset-deg", v.getNode("roll-offset-deg", 1).getValue() or 0);
|
||||
}
|
||||
|
||||
##
|
||||
|
|
Loading…
Add table
Reference in a new issue