Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 2, 2015, 4:48:27 PM (10 years ago)
Author:
gania
Message:

small fixes

File:
1 edited

Legend:

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

    r10731 r10759  
    3737    {
    3838        RegisterObject(SectionController);
    39         this->setFormationMode(WALL);
     39        this->setFormationMode(FormationMode::FINGER4);
    4040
    4141        this->actionTimer_.setTimer(ACTION_INTERVAL, true, createExecutor(createFunctor(&SectionController::action, this)));
    4242        this->myWingman_ = 0;
    4343        this->myDivisionLeader_ = 0;
    44         this->rank_ = SECTIONLEADER;
     44        this->rank_ = Rank::SECTIONLEADER;
    4545
    4646        orxout(internal_error) << this << "Was created" << endl;
     
    5858            return;
    5959       
     60        /*if (this->target_)
     61        {
     62            this->aimAtTarget();
     63            this->doFire();
     64            this->bShooting_ = true;
     65        }*/
    6066        if (this->bHasTargetPosition_)
    6167        {
     
    7682            if (newDivisionLeader)
    7783                orxout(internal_error) << "new DivisionLeader set" << endl;
     84            else
     85            {
     86               
     87            }
    7888
    7989        }
    8090        setTargetPositionOfWingman();
     91        if (this->target_ && this->myWingman_)
     92            this->myWingman_->setTarget(this->target_);
     93               
    8194
    8295    }
     
    88101        Vector3* targetRelativePositionOfWingman;
    89102        switch (this->formationMode_){
    90             case WALL:
     103            case FormationMode::WALL:
    91104            {
    92105                targetRelativePositionOfWingman = new Vector3 (-400, 0, 0); 
    93106                break;
    94107            }
    95             case FINGER4:
    96             {
    97                 break;
    98             }
    99             case VEE:
    100             {
    101                 break;
    102             }
    103             case DIAMOND:
    104             {
     108            case FormationMode::FINGER4:
     109            {
     110                targetRelativePositionOfWingman = new Vector3 (-400, 0, -200); 
     111                break;
     112            }
     113            case FormationMode::VEE:
     114            {
     115                break;
     116            }
     117            case FormationMode::DIAMOND:
     118            {
     119                targetRelativePositionOfWingman = new Vector3 (400, -200, 0);                 
    105120                break;
    106121            }
     
    127142        {
    128143            //0ptr or not DivisionController?
    129             if (!(it) || !((it)->getRank() == DIVISIONLEADER) || !(it->getControllableEntity()))
     144            if (!(it) || !((it)->getRank() == Rank::DIVISIONLEADER) || !(it->getControllableEntity()))
    130145                continue;
    131146            //same team?
Note: See TracChangeset for help on using the changeset viewer.