Nasal/view.nas: fix for regression in handling of /sim/current-view/?-offset-m.
resetViewPos(): set /sim/current-view/?-offset-m to /sim/view[]/config/?-offset-m, not zeros. This requires corresponding change to flightgear to compensate for the extra offset, and fixes things when aircraft implement custom views by writing to /sim/current-view/?-offset-m.
This commit is contained in:
parent
ff503c1093
commit
81fc15d8e7
1 changed files with 3 additions and 3 deletions
|
@ -114,9 +114,9 @@ var resetFOV = func {
|
||||||
|
|
||||||
var resetViewPos = func {
|
var resetViewPos = func {
|
||||||
var v = current.getNode("config");
|
var v = current.getNode("config");
|
||||||
setprop("/sim/current-view/x-offset-m", 0);
|
setprop("/sim/current-view/x-offset-m", v.getNode("x-offset-m", 1).getValue() or 0);
|
||||||
setprop("/sim/current-view/y-offset-m", 0);
|
setprop("/sim/current-view/y-offset-m", v.getNode("y-offset-m", 1).getValue() or 0);
|
||||||
setprop("/sim/current-view/z-offset-m", 0);
|
setprop("/sim/current-view/z-offset-m", v.getNode("z-offset-m", 1).getValue() or 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
var resetViewDir = func {
|
var resetViewDir = func {
|
||||||
|
|
Loading…
Add table
Reference in a new issue