]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/UIUCModel/uiuc_gear.cpp
Fix for bug 1304 - crash loading XML route
[flightgear.git] / src / FDM / UIUCModel / uiuc_gear.cpp
index 9edc77fe973e57973663a3ae7b4db33817fd899b..5cef35357095f3d54e46f4fec89fe8b382734d25 100644 (file)
 
  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- USA or view http://www.gnu.org/copyleft/gpl.html.
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
 **********************************************************************/
 
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
 #include <simgear/compiler.h>
 #include <simgear/misc/sg_path.hxx>
-#include <Aircraft/aircraft.hxx>
 #include <Main/fg_props.hxx>
 
 #include "uiuc_gear.h"
 
-
-
-SG_USING_STD(cerr);
-
-
 #define HEIGHT_AGL_WHEEL d_wheel_rwy_local_v[2]
 
 
@@ -277,12 +274,7 @@ void uiuc_gear()
          
          clear3(f_wheel_local_v);
          reaction_normal_force=0;
-         static const SGPropertyNode * gear_wow
-           = fgGetNode("/gear/gear[0]/wow", false);
-         static const SGPropertyNode * gear_wow1
-           = fgGetNode("/gear/gear[1]/wow", false);
-         static const SGPropertyNode * gear_wow2
-           = fgGetNode("/gear/gear[2]/wow", false); 
+
          fgSetBool("/gear/gear[0]/wow", false);
          fgSetBool("/gear/gear[1]/wow", false);
          fgSetBool("/gear/gear[2]/wow", false);
@@ -377,7 +369,7 @@ void uiuc_gear()
              cross3( d_wheel_cg_body_v, tempF, tempM );
              
              /* Sum forces and moments across all wheels */
-             if (tempF) {
+             if (tempF[0] != 0.0 || tempF[1] != 0.0 || tempF[2] != 0.0) {
                fgSetBool("/gear/gear[1]/wow", true);
              }