]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIManager.cxx
Vivian Meazza:
[flightgear.git] / src / AIModel / AIManager.cxx
index 0047d0199b081895ba55a866e1c03b2b147fa4dc..c1281004e5556a020cb34231cbfc13854f375fdb 100644 (file)
@@ -37,6 +37,7 @@
 #include "AIThermal.hxx"
 #include "AICarrier.hxx"
 #include "AIStatic.hxx"
+#include "AIMultiplayer.hxx"
 
 SG_USING_STD(list);
 
@@ -192,6 +193,23 @@ FGAIManager::createAircraft( FGAIModelEntity *entity,   FGAISchedule *ref) {
         return ai_plane;
 }
 
+void*
+FGAIManager::createMultiplayer( FGAIModelEntity *entity ) {
+     
+    FGAIMultiplayer* ai_plane = new FGAIMultiplayer(this);
+    ai_list.push_back(ai_plane);
+    ++numObjects[0];
+    ++numObjects[FGAIBase::otMultiplayer];
+    ai_plane->setAcType(entity->acType);
+    ai_plane->setCompany(entity->company);
+    ai_plane->setPath(entity->path.c_str());
+
+    ai_plane->init();
+    ai_plane->bind();
+    return ai_plane;
+}
+
+
 void*
 FGAIManager::createShip( FGAIModelEntity *entity ) {