Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 7, 2015, 3:14:40 PM (8 years ago)
Author:
gania
Message:

cleaned source up a bit

File:
1 edited

Legend:

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

    r10925 r10935  
    2828
    2929#include "SectionController.h"
    30 //TODO: formation vectors are wrong, fix it.
    31 // split classes.
    32 // weaponsystem.
    33 //-> Math ?
    34  
     30
    3531namespace orxonox
    3632{
     
    4440        this->setFormationMode(FormationMode::FINGER4);
    4541
    46         //this->actionTimer_.setTimer(ACTION_INTERVAL, true, createExecutor(createFunctor(&SectionController::action, this)));
    4742        this->myWingman_ = 0;
    4843        this->myDivisionLeader_ = 0;
    4944        this->bFirstAction_ = true;
    50         //orxout(internal_error) << this << "Was created" << endl;
    5145
    5246    }
     
    7468   
    7569        SUPER(SectionController, tick, dt);
    76         /*if (this->timeOffset_ > 0.8f && this->timeOffset_ <= 1.6f && !this->bActionCalled_)
    77         {
    78             this->action();
    79             this->bActionCalled_ = true;
    80         }
    81         if (this->timeOffset_ > 2.0f)
    82         {
    83             this->bActionCalled_ = false;
    84         }*/
    85 
     70       
    8671    }
    8772
     
    137122                {
    138123                    this->chooseTarget();
    139                     //orxout (internal_error) << "Section ain't got no target" << endl;
    140124                }
    141                 if (this->hasTarget())
    142                 {
    143                     // this->maneuver();
    144                     // this->bShooting_ = this->canFire();
    145                     // Vector3 healthPosition = bestHealthPickup((this->target_->getWorldPosition() - this->getControllableEntity()->getWorldPosition()).length());
    146                     // if ((this->getControllableEntity()->getWorldPosition() - healthPosition).length() < this->tolerance_)
    147                     // {
    148                     //     //----choose where to go----
    149                     //     this->maneuver();
    150                     // }
    151                     // else
    152                     // {
    153                     //     this->dodgeTowards(healthPosition);
    154                     // }
    155                     // //----fire if you can----
    156                     // this->bShooting_ = this->canFire();               
    157                 }
     125
    158126            }
    159127        }
Note: See TracChangeset for help on using the changeset viewer.