]> git.mxchange.org Git - flightgear.git/commitdiff
Maik JUSTUS: add a missing pair of parens and rounding
authormfranz <mfranz>
Wed, 24 Jan 2007 23:39:48 +0000 (23:39 +0000)
committermfranz <mfranz>
Wed, 24 Jan 2007 23:39:48 +0000 (23:39 +0000)
src/AIModel/AIMultiplayer.cxx

index 8e59b929f82f6bd654c9833ae2ce550aad3e981e..70cf081ec6091d287556b7e70433d45352ccdaf7 100755 (executable)
@@ -276,8 +276,8 @@ void FGAIMultiplayer::update(double dt)
               case SGPropertyNode::INT:   
               case SGPropertyNode::BOOL:
               case SGPropertyNode::LONG:        
-                ival = (int) (1-tau)*((double) (*prevPropIt)->int_value) +
-                  tau*((double) (*nextPropIt)->int_value);
+                ival = (int) (0.5+(1-tau)*((double) (*prevPropIt)->int_value) +
+                  tau*((double) (*nextPropIt)->int_value));
                 pIt->second->setIntValue(ival);
                 //cout << "Int: " << ival << "\n";
                 break;