1
0
Fork 0

#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:
ThorstenB 2012-03-15 20:23:45 +01:00
parent 4af61aba47
commit f03eedab48

View file

@ -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);