Use simgear abstraction instead of directly osg for the AIBase class.
This commit is contained in:
parent
0f8312150d
commit
721ae71cd7
5 changed files with 5 additions and 5 deletions
|
@ -40,7 +40,7 @@ class SGMaterial;
|
||||||
class FGAIManager;
|
class FGAIManager;
|
||||||
class FGAIFlightPlan;
|
class FGAIFlightPlan;
|
||||||
|
|
||||||
class FGAIBase : public osg::Referenced {
|
class FGAIBase : public SGReferenced {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum object_type { otNull = 0, otAircraft, otShip, otCarrier, otBallistic,
|
enum object_type { otNull = 0, otAircraft, otShip, otCarrier, otBallistic,
|
||||||
|
|
|
@ -381,7 +381,7 @@ FGAIManager::getStartPosition(const string& id, const string& pid,
|
||||||
std::string pnumber = scEntry->getStringValue("pennant-number");
|
std::string pnumber = scEntry->getStringValue("pennant-number");
|
||||||
std::string name = scEntry->getStringValue("name");
|
std::string name = scEntry->getStringValue("name");
|
||||||
if (type == "carrier" && (pnumber == id || name == id)) {
|
if (type == "carrier" && (pnumber == id || name == id)) {
|
||||||
osg::ref_ptr<FGAICarrier> carrier = new FGAICarrier;
|
SGSharedPtr<FGAICarrier> carrier = new FGAICarrier;
|
||||||
carrier->readFromScenario(scEntry);
|
carrier->readFromScenario(scEntry);
|
||||||
|
|
||||||
if (carrier->getParkPosition(pid, geodPos, hdng, uvw)) {
|
if (carrier->getParkPosition(pid, geodPos, hdng, uvw)) {
|
||||||
|
|
|
@ -46,7 +46,7 @@ class FGAIManager : public SGSubsystem
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// A list of pointers to AI objects
|
// 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::iterator ai_list_iterator;
|
||||||
typedef ai_list_type::const_iterator ai_list_const_iterator;
|
typedef ai_list_type::const_iterator ai_list_const_iterator;
|
||||||
|
|
||||||
|
|
|
@ -174,7 +174,7 @@ private:
|
||||||
IC_struct IC;
|
IC_struct IC;
|
||||||
|
|
||||||
// A list of pointers to AI objects
|
// 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::iterator sm_list_iterator;
|
||||||
typedef sm_list_type::const_iterator sm_list_const_iterator;
|
typedef sm_list_type::const_iterator sm_list_const_iterator;
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ private:
|
||||||
void ProcessChatMsg(const MsgBuf& Msg, const netAddress& SenderAddress);
|
void ProcessChatMsg(const MsgBuf& Msg, const netAddress& SenderAddress);
|
||||||
|
|
||||||
/// maps from the callsign string to the FGAIMultiplayer
|
/// 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;
|
MultiPlayerMap mMultiPlayerMap;
|
||||||
|
|
||||||
netSocket* mSocket;
|
netSocket* mSocket;
|
||||||
|
|
Loading…
Reference in a new issue