From 73c1b5beb43badaf31908e3459b68d8bd5b7967e Mon Sep 17 00:00:00 2001 From: mfranz Date: Thu, 21 Apr 2005 14:17:59 +0000 Subject: [PATCH] "condition" needs to be clamped like "mixture", so that it is settable via controls.adjEngControl() (this is necessary to make the b1900d's condition settable via m/M keys or the joystick's configure mixture bindings) --- src/Controls/controls.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Controls/controls.cxx b/src/Controls/controls.cxx index c5eceeea5..57f19d702 100644 --- a/src/Controls/controls.cxx +++ b/src/Controls/controls.cxx @@ -1556,10 +1556,12 @@ FGControls::set_condition( int engine, double val ) if ( engine == ALL_ENGINES ) { for ( int i = 0; i < MAX_ENGINES; i++ ) { condition[i] = val; + CLAMP( &condition[i], 0.0, 1.0 ); } } else { if ( (engine >= 0) && (engine < MAX_ENGINES) ) { condition[engine] = val; + CLAMP( &condition[engine], 0.0, 1.0 ); } } }