----- Original Message ----- From: "David Culp" <[EMAIL PROTECTED]> To: "FlightGear developers discussions" <[EMAIL PROTECTED]> Sent: Wednesday, November 12, 2003 7:51 PM Subject: Re: [Flightgear-devel] [Multiplayer] Oh where Oh where .......
> In the current code -- there is just the single airplane being simulated on > the display ?? or where could I find a list/array of a/c that are being > managed so I can register each plane with the server and have the server > relay updates for all of them ?? Look in the src/ATC directory. There you will find an FGAIMgr class that instantiates aircraft. The aircraft themselves are derived from FGAIEntity via FGAIPlane. Presently the only AI airplane in the base package is a cessna flying out of KEMT (in the Los Angeles basin). > (if its just the one plane, once I get it to fly multiplayer, my focus will > be to add multiple/AI plane support to the code, so comments towards > achieving that goal will be welcome also) You can add more AI aircraft to the FGAIMgr's list: // Activate AI traffic at an airport void FGAIMgr::ActivateAirport(string ident) { ATC->AIRegisterAirport(ident); // TODO - need to start the traffic more randomly FGAILocalTraffic* local_traffic = new FGAILocalTraffic; //local_traffic->Init(ident, IN_PATTERN, TAKEOFF_ROLL); local_traffic->Init(ident); local_traffic->FlyCircuits(1, true); // Fly 2 circuits with touch & go in between FGAITanker* tanker = new FGAITanker; tanker->Init(); ai_list.push_back(local_traffic); ai_list.push_back(tanker); activated[ident] = 1; } Here I've added another AI plane, a KC-135 called FGAITanker, that orbits over the LA basin. Presently the AI traffic's FDM is contained within the class derived from FGAIPLane. So the Cessna and the tanker use entirely different FDMs. A more generalized approach would be to move the FDM into FGAIPlane. I started working on a generalized and scriptable version of my tanker, but have been sidetracked by other stuff. Let me know if you want the tanker code and I'll send it to you. Dave -- **************************** David Culp davidculp2[at]comcast.net **************************** Sounds good -- like most of what I'm looking for is there -- would definitly like to look over the code and see how much work to hook it into my network setup _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel