]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIManager.hxx
Set the format default to float instead of int.
[flightgear.git] / src / AIModel / AIManager.hxx
index fd3357f5bb23ac8bf099614ea463777fff897e9f..619d91961d60bb9d0a6c805f1bf94d282e17b4fc 100644 (file)
@@ -78,9 +78,11 @@ public:
     inline double get_user_yaw() { return user_yaw; }
     inline double get_user_speed() {return user_speed; }
 
-    inline int getNum( FGAIBase::object_type ot ) { return numObjects[ot]; }
+    inline int getNum( FGAIBase::object_type ot ) {
+      return (0 < ot && ot < FGAIBase::MAX_OBJECTS) ? numObjects[ot] : numObjects[0];
+    }
 
-    void processScenario( string filename );
+    void processScenario( string &filename );
 
 private: