Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 7, 2015, 8:34:20 AM (9 years ago)
Author:
gania
Message:

check in

File:
1 edited

Legend:

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

    r10915 r10923  
    7070        if (!this->myLeader_)
    7171        {
    72             if (this->actionTime_ == 2.0f)
     72            /*if (this->actionTime_ == 2.0f)
    7373            {
    7474                if (this->timeOffset_ >= 0.0f && this->timeOffset_ <= 0.8f && !this->bActionCalled_)
     
    9393                    this->bActionCalled_ = false;
    9494                }
    95             }
     95            }*/
    9696        }
    9797        else
    9898        {
    99             if (this->timeOffset_ >= this->actionTime_ && this->timeOffset_ <= this->actionTime_ + 0.4f && !this->bActionCalled_)
     99           /* if (this->timeOffset_ >= this->actionTime_ && this->timeOffset_ <= this->actionTime_ + 0.4f && !this->bActionCalled_)
    100100            {
    101101                this->action();
     
    105105            {
    106106                this->bActionCalled_ = false;
    107             }
     107            }*/
    108108        }
    109109       
     
    114114    void WingmanController::action()
    115115    {
    116 
     116        if (!this || !this->getControllableEntity())
     117            return;
    117118        //----If no leader, find one----
    118119        if (!this->myLeader_)
     
    122123            if (this->myLeader_)
    123124            {
    124                 //spread copyOrientation called equally among the division
    125                 if (this->myLeader_->getIdentifier()->getName() == "SectionController")
    126                     this->actionCounter_ = 1;
    127                 else
    128                     this->actionCounter_ = 4;
     125               
    129126            }
    130127        }
     
    137134        {
    138135           ActionpointController::action();
     136            if (!this || !this->getControllableEntity())
     137                return;
     138
    139139        }
    140140        else if (this->myLeader_)
     
    170170            }
    171171        }
    172         this->actionCounter_ += this->actionCounter_ < 100000 ? 1 : -this->actionCounter_ ;
    173172    }
    174173     
Note: See TracChangeset for help on using the changeset viewer.