X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FAIModel%2FAIStorm.cxx;h=a4241df465c2f3e17399dae1a0c687f3c5589a04;hb=f7cd808f2313a8b35165b44cbf805f2d57e2c567;hp=0fafd7055168f1f043d3cd1e87cc85b26f0a6d8b;hpb=c2d8dcc18baf88176ad48f0b7163dcb4aee51f90;p=flightgear.git diff --git a/src/AIModel/AIStorm.cxx b/src/AIModel/AIStorm.cxx index 0fafd7055..a4241df46 100644 --- a/src/AIModel/AIStorm.cxx +++ b/src/AIModel/AIStorm.cxx @@ -22,7 +22,6 @@ # include #endif -#include #include
#include
#include @@ -31,12 +30,14 @@ #include #include -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);