]> git.mxchange.org Git - flightgear.git/commit
David Culp:
authorehofman <ehofman>
Sat, 15 May 2004 09:07:55 +0000 (09:07 +0000)
committerehofman <ehofman>
Sat, 15 May 2004 09:07:55 +0000 (09:07 +0000)
commit1dfe93d5509247b537f606ea2b3554ec8b4752ef
treec4feb3a543e19e93a7628b8edb061fe9f4fd8b61
parentbc22a50cdeb4db1b298f6f6b3e8046f0763f2fbb
David Culp:

Here's the newest AI stuff.

The AIManager at init() creates a new scenario.  Right now the
default_scenario is hard coded in, but eventually the AIManager should get
the scenario filename from preferences.xml.

The scenario defines which AI objects will be created.  Right now it only
creates AIAircraft, but this is easily extended.  The scenario also defines
which flightplan will be assigned to the airplane.  Scenario config files go
in data/Data/AI.

The Airplane gets a pointer to a FlightPlan object.  Each airplane should get
its own flightplan object, even if two airplanes have the same flight plan.
This is because  the flightplan maintains the iterator pointing to the
current waypoint, and two airplanes might be at different locations (for
instance if they were created at different times).  The flight plan files go
in data/Data/AI/FlightPlans.

When the airplane gets to the waypoint named "END" it vanishes.  The
AIAircraft destructor deletes its flight plan (if it has one).

The last waypoint is a place holder only.  I called mine
<WPT><NAME>"EOF"</NAME></WPT>.
src/AIModel/AIAircraft.cxx
src/AIModel/AIAircraft.hxx
src/AIModel/AIBase.cxx
src/AIModel/AIFlightPlan.cxx [new file with mode: 0644]
src/AIModel/AIFlightPlan.hxx [new file with mode: 0644]
src/AIModel/AIManager.cxx
src/AIModel/AIManager.hxx
src/AIModel/AIScenario.cxx [new file with mode: 0644]
src/AIModel/AIScenario.hxx [new file with mode: 0644]
src/AIModel/Makefile.am