]> git.mxchange.org Git - flightgear.git/commitdiff
Use simgear abstraction instead of directly osg for the AIBase class.
authorMathias Froehlich <Mathias.Froehlich@web.de>
Wed, 16 Jun 2010 04:57:47 +0000 (06:57 +0200)
committerMathias Froehlich <Mathias.Froehlich@web.de>
Wed, 16 Jun 2010 05:00:18 +0000 (07:00 +0200)
src/AIModel/AIBase.hxx
src/AIModel/AIManager.cxx
src/AIModel/AIManager.hxx
src/AIModel/submodel.hxx
src/MultiPlayer/multiplaymgr.hxx

index 1ab3a640eacb314cf880051a90950eeba878d9ae..ee6a70a343af7e27a5cac58d5c8e8c065b471421 100644 (file)
@@ -40,7 +40,7 @@ class SGMaterial;
 class FGAIManager;
 class FGAIFlightPlan;
 
-class FGAIBase : public osg::Referenced {
+class FGAIBase : public SGReferenced {
 
 public:
     enum object_type { otNull = 0, otAircraft, otShip, otCarrier, otBallistic,
index ed4f4a5345e5bb53563b12132e2e100316c484b0..afffdc81785ff4246fe469e4ba4ddbf3e4102b76 100644 (file)
@@ -381,7 +381,7 @@ FGAIManager::getStartPosition(const string& id, const string& pid,
                         std::string pnumber = scEntry->getStringValue("pennant-number");
                         std::string name = scEntry->getStringValue("name");
                         if (type == "carrier" && (pnumber == id || name == id)) {
-                            osg::ref_ptr<FGAICarrier> carrier = new FGAICarrier;
+                            SGSharedPtr<FGAICarrier> carrier = new FGAICarrier;
                             carrier->readFromScenario(scEntry);
 
                             if (carrier->getParkPosition(pid, geodPos, hdng, uvw)) {
index 3f6dd9c2fc5d21c349f9c424ddac1cab6aed026e..8f582801afee5880e9060b7992b3ff7e6ac78929 100644 (file)
@@ -46,7 +46,7 @@ class FGAIManager : public SGSubsystem
 public:
 
     // A list of pointers to AI objects
-    typedef list <osg::ref_ptr<FGAIBase> > ai_list_type;
+    typedef list <SGSharedPtr<FGAIBase> > ai_list_type;
     typedef ai_list_type::iterator ai_list_iterator;
     typedef ai_list_type::const_iterator ai_list_const_iterator;
 
index 7ca046f9dc0789f8334c3a572634772d7635ea15..9709bb375f4806772159c2ba9e002cc12b34ea32 100644 (file)
@@ -174,7 +174,7 @@ private:
     IC_struct  IC;
 
     // A list of pointers to AI objects
-    typedef list <osg::ref_ptr<FGAIBase> > sm_list_type;
+    typedef list <SGSharedPtr<FGAIBase> > sm_list_type;
     typedef sm_list_type::iterator sm_list_iterator;
     typedef sm_list_type::const_iterator sm_list_const_iterator;
 
index 96e56f2428a29f8e56f3313650be78b978029331..eb5fc1edf004bda1570503d828a03c1ced3c3c94 100644 (file)
@@ -86,7 +86,7 @@ private:
   void ProcessChatMsg(const MsgBuf& Msg, const netAddress& SenderAddress);
 
   /// maps from the callsign string to the FGAIMultiplayer
-  typedef std::map<std::string, osg::ref_ptr<FGAIMultiplayer> > MultiPlayerMap;
+  typedef std::map<std::string, SGSharedPtr<FGAIMultiplayer> > MultiPlayerMap;
   MultiPlayerMap mMultiPlayerMap;
 
   netSocket* mSocket;