]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/MagicCarpet.cxx
Harald JOHNSEN:
[flightgear.git] / src / FDM / MagicCarpet.cxx
index 738e1e5644de2bad81bd3ae93fbfa250dda1064f..0402c28a50bcdb190a6310f43b9b595ba032b76d 100644 (file)
@@ -2,7 +2,7 @@
 //
 // Written by Curtis Olson, started October 1999.
 //
-// Copyright (C) 1999  Curtis L. Olson  - curt@flightgear.org
+// Copyright (C) 1999  Curtis L. Olson  - http://www.flightgear.org/~curt
 //
 // This program is free software; you can redistribute it and/or
 // modify it under the terms of the GNU General Public License as
@@ -33,7 +33,7 @@
 
 
 FGMagicCarpet::FGMagicCarpet( double dt ) {
-    set_delta_t( dt );
+//     set_delta_t( dt );
 }
 
 
@@ -49,14 +49,21 @@ void FGMagicCarpet::init() {
 
 
 // Run an iteration of the EOM (equations of motion)
-void FGMagicCarpet::update( int multiloop ) {
+void FGMagicCarpet::update( double dt ) {
     // cout << "FGLaRCsim::update()" << endl;
 
-    double time_step = get_delta_t() * multiloop;
+    if (is_suspended())
+      return;
+
+    // int multiloop = _calc_multiloop(dt);
+
+    double time_step = dt;
 
     // speed and distance traveled
     double speed = globals->get_controls()->get_throttle( 0 ) * 2000; // meters/sec
-    if ( globals->get_controls()->get_brake( 0 ) ) {
+    if ( globals->get_controls()->get_brake_left() > 0.0
+         || globals->get_controls()->get_brake_right() > 0.0 )
+    {
         speed = -speed;
     }