]> git.mxchange.org Git - flightgear.git/commitdiff
"condition" needs to be clamped like "mixture", so that it is settable via
authormfranz <mfranz>
Thu, 21 Apr 2005 14:17:59 +0000 (14:17 +0000)
committermfranz <mfranz>
Thu, 21 Apr 2005 14:17:59 +0000 (14:17 +0000)
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

index c5eceeea5a99fc18c67efdb6339eb5c69a9b8cb3..57f19d7027323e9871ca7f20c792cd90226c26ae 100644 (file)
@@ -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 );
        }
     }
 }