From 983aa3f81281329224d85ae9792621f64824e4fb Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Thu, 10 Aug 2017 13:31:24 +0100 Subject: [PATCH] bugfix, sorry never commited it yet --- Nasal/icing.nas | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Nasal/icing.nas b/Nasal/icing.nas index d3475369..c29d3966 100644 --- a/Nasal/icing.nas +++ b/Nasal/icing.nas @@ -59,8 +59,8 @@ setlistener("/sim/signals/fdm-initialized", func { var e = 0; var spread = 0; var windowprb = getprop("/controls/switches/windowprobeheat"); - stateL = getprop("/engines/engine[0]/state"); - stateR = getprop("/engines/engine[1]/state"); + var stateL = getprop("/engines/engine[0]/state"); + var stateR = getprop("/engines/engine[1]/state"); }); var icingInit = func { @@ -116,6 +116,8 @@ var icingModel = func { rengAnti = getprop("/controls/deice/rengine"); WingHasBeenTurnedOff = getprop("/controls/deice/WingHasBeenTurnedOff"); GroundModeFinished = getprop("/controls/deice/GroundModeFinished"); + stateL = getprop("/engines/engine[0]/state"); + stateR = getprop("/engines/engine[1]/state"); if (temperature >= 0 or !icingCond) { setprop("/systems/icing/severity", "0");