]> git.mxchange.org Git - flightgear.git/commitdiff
David Culp:
authorehofman <ehofman>
Wed, 16 Nov 2005 15:23:18 +0000 (15:23 +0000)
committerehofman <ehofman>
Wed, 16 Nov 2005 15:23:18 +0000 (15:23 +0000)
Here's a fix for a bug I introduced when I updated the AIStorm with
turbulence.  The change I made to the FGAIEntity struct was overriding the
thermal <strength-fps> data.

src/AIModel/AIBase.hxx
src/AIModel/AIManager.cxx
src/AIModel/AIScenario.cxx

index 584e737147d08552ca9a3b693129a7cf1d2b6d1e..4d1f630b1915516948a57e8ea3e3a1e342c2e88f 100644 (file)
@@ -70,7 +70,8 @@ typedef struct {
    double azimuth;            // used by ballistic objects
    double elevation;          // used by ballistic objects
    double rudder;             // used by ship objects
-   double strength;           // used by thermal and storm objects
+   double strength;           // used by thermal 
+   double turb_strength;      // used by storm objects
    double diameter;           // used by thermal and storm objects
    double height_msl;         // used by thermal and storm objects
    double eda;                // used by ballistic objects
index e20376516996d86bc7d44880be7ee11c5cf42fd1..88d4c04aae8f5c3b18c89ba7edf648fd5bfbfb4d 100644 (file)
@@ -307,7 +307,7 @@ FGAIManager::createStorm( FGAIModelEntity *entity ) {
         ai_storm->setAltitude(entity->altitude); 
         ai_storm->setDiameter(entity->diameter / 6076.11549); 
         ai_storm->setHeight(entity->height_msl); 
-        ai_storm->setStrengthNorm(entity->strength); 
+        ai_storm->setStrengthNorm(entity->turb_strength); 
         ai_storm->setLongitude(entity->longitude);
         ai_storm->setLatitude(entity->latitude);
         ai_storm->init();
index 97a60fd4ce5b4bded0f582cf499787bf4c9173cf..6fd72613a78ace5a514aadc1e069af041f58e04f 100644 (file)
@@ -87,7 +87,7 @@ FGAIScenario::FGAIScenario(const string &filename)
      en->elevation      = entry_node->getDoubleValue("elevation", 0.0); 
      en->rudder         = entry_node->getFloatValue("rudder", 0.0);
      en->strength       = entry_node->getDoubleValue("strength-fps", 8.0);
-     en->strength       = entry_node->getDoubleValue("strength-norm", 1.0);  
+     en->turb_strength  = entry_node->getDoubleValue("strength-norm", 1.0);  
      en->diameter       = entry_node->getDoubleValue("diameter-ft", 0.0);
      en->height_msl     = entry_node->getDoubleValue("height-msl", 5000.0);
      en->eda            = entry_node->getDoubleValue("eda", 0.007);