Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 3, 2010, 6:41:43 PM (14 years ago)
Author:
solex
Message:

master/slave interaction of bots now correct - getting closer to formation flight

File:
1 edited

Legend:

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

    r6833 r6850  
    5151            inline int getTeam() const
    5252                { return this->team_; }
    53             //virtual void changedControllableEntity();
     53            virtual void changedControllableEntity();
    5454
    5555
    5656        protected:
     57
     58            int team_;
     59            int freedomCount_;
     60            enum State {SLAVE, MASTER, FREE};
     61            State state_;
     62            std::list<ArtificialController*> slaves_;
     63
    5764            void targetDied();
    5865
    5966            void moveToPosition(const Vector3& target);
     67            //void speedToTargetPosition(const Vector3& target);
    6068            void moveToTargetPosition();
    6169
    62             enum State {SLAVE, MASTER, FREE};
    6370            int getState();
    64             std::list<ArtificialController*> slaves_;
     71
    6572            void unregisterSlave();
    6673            void searchNewMaster();
    6774            void commandSlaves();
    6875            void setNewMasterWithinFormation();
    69             void freeAllSlaves();
     76            void freeSlaves();
     77            void forceFreeSlaves();
    7078            void loseMasterState();
     79            void forceFreedom();
     80            bool forcedFree();
    7181
    7282            ArtificialController *myMaster_;
     
    90100            bool bShooting_;
    91101
    92 
    93             State state_;
    94             int team_;
    95 
    96102        private:
    97103    };
Note: See TracChangeset for help on using the changeset viewer.