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/DivisionController.cc

    r10883 r10885  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Gani Aliguzhinov
    2424 *   Co-authors:
    25  *      Dominik Solenicki
     25 *      ...
    2626 *
    2727 */
     
    9696    }
    9797   
    98     bool DivisionController::setWingman(ActionpointController* wingman)
     98    bool DivisionController::setWingman(ActionpointController* newWingman)
    9999    {
    100 
    101         WingmanController* newWingman = orxonox_cast<WingmanController*>(wingman);
    102100        if (!this->myWingman_)
    103101        {
    104102            this->myWingman_ = newWingman;
     103            if (!this->hasFollower())
     104                newWingman->takeActionpoints (this->parsedActionpoints_, this->loopActionpoints_, this->bLoop_);
    105105            return true;
    106106        }
     
    110110        }
    111111    }
    112     bool DivisionController::setFollower(ActionpointController* myFollower)
     112    bool DivisionController::setFollower(ActionpointController* newFollower)
    113113    {
    114         LeaderController* newFollower = orxonox_cast<LeaderController*> (myFollower);
    115114        if (!this->myFollower_)
    116115        {
     
    120119                this->myWingman_->takeActionpoints (std::vector<Point>(), std::vector<Point>(), false);
    121120            }
     121
     122            newFollower->takeActionpoints (this->parsedActionpoints_, this->loopActionpoints_, this->bLoop_);
     123           
    122124            return true;
    123125        }
Note: See TracChangeset for help on using the changeset viewer.