#708: reset engine list on FDM reset
Need to clear the engine list before appending a new set of engines. Engine list was growing on every FDM reset, causing weird control effects after (multiple) sim resets.
This commit is contained in:
parent
4af61aba47
commit
f03eedab48
1 changed files with 3 additions and 0 deletions
|
@ -462,6 +462,9 @@ _setlistener("/sim/signals/fdm-initialized", func {
|
|||
var sel = props.globals.getNode("/sim/input/selected", 1);
|
||||
var engs = props.globals.getNode("/controls/engines").getChildren("engine");
|
||||
|
||||
# need to reset engine list on every FDM reset
|
||||
engines = [];
|
||||
# process all engines
|
||||
foreach(var e; engs) {
|
||||
var index = e.getIndex();
|
||||
var s = sel.getChild("engine", index, 1);
|
||||
|
|
Loading…
Add table
Reference in a new issue