Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 28, 2015, 10:30:56 PM (8 years ago)
Author:
gania
Message:

added other weapons

File:
1 edited

Legend:

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

    r10883 r10885  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Gani Aliguzhinov
    2424 *   Co-authors:
    25  *      Dominik Solenicki
     25 *      ...
    2626 *
    2727 */
     
    9696        if (!myDivisionLeader_)
    9797        {
    98             LeaderController* newDivisionLeader = findNewDivisionLeader();
     98            ActionpointController* newDivisionLeader = findNewDivisionLeader();
    9999            this->myDivisionLeader_ = newDivisionLeader;
    100100            //spread copyOrientation called equally among the division
    101101            if (this->myDivisionLeader_)
    102102            {
    103                 this->actionCounter_ = 8;
     103                this->actionCounter_ = 5;
    104104            }
    105105        }
     
    147147                     + (orient* (targetRelativePosition)));
    148148                //let ship finish rotating. also don't call copyOrientation to often as it is a slow function.
    149                 if (this->actionCounter_ % 9 == 0 && !this->bHasTargetOrientation_)
     149                if (this->actionCounter_ % 6 == 0 && !this->bHasTargetOrientation_)
    150150                    this->setAction (Action::FLY, targetAbsolutePosition, orient);
    151151                else
     
    300300   
    301301
    302     LeaderController* SectionController::findNewDivisionLeader()
     302    ActionpointController* SectionController::findNewDivisionLeader()
    303303    {
    304304
     
    306306            return 0;
    307307
    308         LeaderController* closestLeader = 0;
     308        ActionpointController* closestLeader = 0;
    309309        float minDistance =  std::numeric_limits<float>::infinity();
    310310        //go through all pawns
    311         for (ObjectList<LeaderController>::iterator it = ObjectList<LeaderController>::begin(); it; ++it)
     311        for (ObjectList<ActionpointController>::iterator it = ObjectList<ActionpointController>::begin(); it; ++it)
    312312        {
    313313            //0ptr or not DivisionController?
     
    338338        return 0;
    339339    }
    340     bool SectionController::setWingman(ActionpointController* wingman)
    341     {
    342         WingmanController* newWingman = orxonox_cast<WingmanController*>(wingman);
     340    bool SectionController::setWingman(ActionpointController* newWingman)
     341    {
    343342
    344343        if (!this->myWingman_)
    345344        {
    346345            this->myWingman_ = newWingman;
     346            newWingman->takeActionpoints (this->parsedActionpoints_, this->loopActionpoints_, this->bLoop_);
    347347            return true;
    348348        }
Note: See TracChangeset for help on using the changeset viewer.