]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/YASim/Gear.cpp
Unified handling of (fuel-)tank properties
[flightgear.git] / src / FDM / YASim / Gear.cpp
index 886a1a98953f49404f3d96c74de208c6b9b7ae0a..ce2517c7356194d0432aa8400b1c44fcd736f531 100644 (file)
@@ -332,8 +332,10 @@ void Gear::calcForce(RigidBody* body, State *s, float* v, float* rot)
     float b = ground[3] - Math::dot3(tmp, ground)+BumpAltitude;
 
     // Calculate the point of ground _contact.
-    _frac = a/(a-b);
-    if(b < 0) _frac = 1;
+    if(b < 0)
+        _frac = 1;
+    else
+        _frac = a/(a-b);
     for(i=0; i<3; i++)
        _contact[i] = _pos[i] + _frac*_cmpr[i];