Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 17, 2010, 4:45:50 PM (14 years ago)
Author:
solex
Message:

finally some decent formation flying!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/ai/src/orxonox/controllers/ArtificialController.h

    r6888 r6919  
    5353            inline int getTeam() const
    5454                { return this->team_; }
     55            inline void setFormationFlight(bool formation)
     56                { this->formationFlight_ = formation; }
     57            inline bool getFormationFlight() const
     58                { return this->formationFlight_; }
    5559            virtual void changedControllableEntity();
    5660
     
    5963
    6064            int team_;
     65            bool formationFlight_;
    6166            int freedomCount_;
    6267            enum State {SLAVE, MASTER, FREE};
    6368            State state_;
    6469            std::vector<ArtificialController*> slaves_;
     70            ArtificialController *myMaster_;
     71            enum SpecificMasterAction {NONE, HOLD, SPIN, TURN180};
     72            SpecificMasterAction specificMasterAction_;
     73            int specificMasterActionHoldCount_;
    6574
    6675            void targetDied();
     
    8089            void forceFreedom();
    8190            bool forcedFree();
    82 
    83             ArtificialController *myMaster_;
     91            void specificMasterActionHold();
     92            void turn180();
     93            void spin();
    8494
    8595            void setTargetPosition(const Vector3& target);
Note: See TracChangeset for help on using the changeset viewer.