]> git.mxchange.org Git - flightgear.git/commitdiff
Make the scenerio's work again (now for real) and a small number of updates.
authorehofman <ehofman>
Thu, 23 Sep 2004 09:39:55 +0000 (09:39 +0000)
committerehofman <ehofman>
Thu, 23 Sep 2004 09:39:55 +0000 (09:39 +0000)
src/AIModel/AIManager.cxx
src/AIModel/AIManager.hxx
src/AIModel/AIScenario.cxx
src/AIModel/AIScenario.hxx
src/AIModel/AIStorm.cxx

index 0a19d632d22a314782bb42b9a34fd4eb1e9516b2..e066b5a09135417219599e94b6550238c14cf843 100644 (file)
@@ -288,26 +288,25 @@ void FGAIManager::processThermal( FGAIThermal* thermal ) {
 }
 
 
-void FGAIManager::processScenario( string filename ) {
+void FGAIManager::processScenario( string &filename ) {
   FGAIScenario* s = new FGAIScenario( filename );
   for (int i=0;i<s->nEntries();i++) {
     FGAIModelEntity* en = s->getNextEntry();
 
     if (en) {
-      if (en->m_type == "aircraft") {
+      if ( !strcmp(en->m_type, "aircraft")) {
          createAircraft( en );
 
-      } else if (en->m_type == "ship") {
+      } else if ( !strcmp(en->m_type, "ship")) {
            createShip( en );
 
-      } else if (en->m_type == "storm") {
+      } else if ( !strcmp(en->m_type, "thunderstorm")) {
         createStorm( en );
 
-      } else if (en->m_type == "thermal") {
+      } else if ( !strcmp(en->m_type, "thermal")) {
         createThermal( en );
 
-      } else if (en->m_type == "ballistic") {
+      } else if ( !strcmp(en->m_type, "ballistic")) {
         createBallistic( en );
       }      
     }
index 973afa4fd7e9870dab189609f2629612421ea8e8..619d91961d60bb9d0a6c805f1bf94d282e17b4fc 100644 (file)
@@ -82,7 +82,7 @@ public:
       return (0 < ot && ot < FGAIBase::MAX_OBJECTS) ? numObjects[ot] : numObjects[0];
     }
 
-    void processScenario( string filename );
+    void processScenario( string &filename );
 
 private:
 
index 7052f5b6f7b154856e80a4cf0c6c9f54106a06aa..cd46c170c8c6fd872b594fb81e1f5f2864f80c4a 100644 (file)
@@ -34,7 +34,7 @@
 
 
 
-FGAIScenario::FGAIScenario(string filename)
+FGAIScenario::FGAIScenario(string &filename)
 {
   int i;
   SGPath path( globals->get_fg_root() );
index 424b449706a91b69b31bf767637bcf3559ee4d47..f7b8f47cd248c338192b787c21f165e1aff18146 100644 (file)
@@ -34,7 +34,7 @@ class FGAIScenario {
 
 public:
 
-   FGAIScenario(string filename);
+   FGAIScenario(string &filename);
    ~FGAIScenario();
 
    FGAIModelEntity* getNextEntry( void );
index 896253614e5360a8ce9361d0f801dff1af2a0b60..edba9038dc7720b24d4ea6e2a6cde15bf246de97 100644 (file)
@@ -36,7 +36,7 @@ SG_USING_STD(string);
 
 FGAIStorm::FGAIStorm(FGAIManager* mgr) {
    manager = mgr;   
-   _type_str = "storm";
+   _type_str = "thunderstorm";
    _otype = otStorm;
 }