]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIStorm.cxx
Overhaul the ground-net / parking code.
[flightgear.git] / src / AIModel / AIStorm.cxx
index 0fafd7055168f1f043d3cd1e87cc85b26f0a6d8b..a4241df465c2f3e17399dae1a0c687f3c5589a04 100644 (file)
@@ -22,7 +22,6 @@
 #  include <config.h>
 #endif
 
-#include <simgear/math/point3d.hxx>
 #include <Main/fg_props.hxx>
 #include <Main/globals.hxx>
 #include <Scenery/scenery.hxx>
 #include <cstdlib>
 #include <time.h>
 
-SG_USING_STD(string);
+using std::string;
 
 #include "AIStorm.hxx"
 
 
-FGAIStorm::FGAIStorm() : FGAIBase(otStorm) {
+FGAIStorm::FGAIStorm() :
+   FGAIBase(otStorm, false)
+{
    delay = 3.6;
    subflashes = 1;
    timer = 0.0;
@@ -74,8 +75,8 @@ void FGAIStorm::readFromScenario(SGPropertyNode* scFileNode) {
   setStrengthNorm(scFileNode->getDoubleValue("strength-norm", 1.0)); 
 }
 
-bool FGAIStorm::init() {
-   return FGAIBase::init();
+bool FGAIStorm::init(bool search_in_AI_path) {
+   return FGAIBase::init(search_in_AI_path);
 }
 
 void FGAIStorm::bind() {
@@ -165,7 +166,7 @@ void FGAIStorm::Run(double dt) {
    range = range_ft / 6076.11549;
 
    if (range < (diameter * 0.5) &&
-       user_altitude > (altitude - 1000.0) &&
+       user_altitude > (altitude_ft - 1000.0) &&
        user_altitude < height) {
               turb_mag_node->setDoubleValue(strength_norm);
               turb_rate_node->setDoubleValue(0.5);