Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 7, 2015, 10:24:20 PM (8 years ago)
Author:
gania
Message:

cleaned up a bit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/campaignHS15/src/orxonox/controllers/MasterController.cc

    r10954 r10955  
    5858        if (this->ticks_ == 1)
    5959        {
     60            //fill the vector in the first tick
    6061            for (ObjectList<ActionpointController>::iterator it = ObjectList<ActionpointController>::begin(); it; ++it)
    6162            {
     
    6970        else
    7071        {
     72
    7173            if (this->controllers_.empty())
    7274                return;
    7375
     76            //iterate over vecotr with the index, keep index in boundaries
    7477            if (this->indexOfCurrentController_ >= this->controllers_.size())
    7578            {
    7679                this->indexOfCurrentController_ = 0;
    7780            }
     81            //each 9 ticks index is incremented
    7882            if (this->numberOfTicksPassedSinceLastActionCall_ >= 9)
    7983            {
     
    8387            if (this->numberOfTicksPassedSinceLastActionCall_ > 0)
    8488            {
     89                //call maneuver for current index
    8590                if (this->numberOfTicksPassedSinceLastActionCall_ == 3)
    8691                {
     
    95100                else if (this->numberOfTicksPassedSinceLastActionCall_ == 6)
    96101                {
     102                    //call canFire for current index
    97103                    if (!this->controllers_.at(this->indexOfCurrentController_))
    98104                    {
     
    107113            else
    108114            {
     115                //call action for current index
    109116                if (!this->controllers_.at(this->indexOfCurrentController_))
    110117                {
Note: See TracChangeset for help on using the changeset viewer.