From b1a3428bd8ae63214329cb571995a600415c8a8b Mon Sep 17 00:00:00 2001 From: mfranz Date: Tue, 30 Sep 2008 18:11:46 +0000 Subject: [PATCH] make slewProp(), and with it {aileron,elevator,rudder}Trim return new value --- Nasal/controls.nas | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Nasal/controls.nas b/Nasal/controls.nas index 4a76092cd..48a7775cf 100644 --- a/Nasal/controls.nas +++ b/Nasal/controls.nas @@ -162,11 +162,12 @@ var stepProps = func { # a rate, in units per second. NOTE: this modifies the property for # the current frame only; it is intended to be called by bindings # which repeat each frame. If you want to cause motion over time, see -# interpolate(). +# interpolate(). Returns new value. # var slewProp = func(prop, delta) { delta *= getprop("/sim/time/delta-realtime-sec"); - setprop(prop, getprop(prop) + delta); + setprop(prop, var val = getprop(prop) + delta); + return val; } # Standard trim rate, in units per second. Remember that the full