Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9255 for code/trunk/src


Ignore:
Timestamp:
May 28, 2012, 12:21:45 AM (12 years ago)
Author:
landauf
Message:

fixed warnings in msvc
removed authorship for code that wasn't written by me

Location:
code/trunk/src/orxonox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/controllers/FormationController.cc

    r9016 r9255  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      ...
    2424 *   Co-authors:
    2525 *      Dominik Solenicki
     
    6161  static const unsigned int STANDARD_MAX_FORMATION_SIZE = 9;
    6262  static const int RADIUS_TO_SEARCH_FOR_MASTERS = 5000;
    63   static const int FORMATION_LENGTH =  110;
    64   static const int FORMATION_WIDTH =  110;
     63  static const float FORMATION_LENGTH =  110;
     64  static const float FORMATION_WIDTH =  110;
    6565  static const int FREEDOM_COUNT = 4; //seconds the slaves in a formation will be set free when master attacks an enemy
    6666  static const float SPEED_MASTER = 0.6f;
     
    324324                {   //linear speed reduction
    325325                    this->getControllableEntity()->moveFrontBack(distance/100.0f*0.4f*SPEED_MASTER);
    326                    
     326
    327327                } else this->getControllableEntity()->moveFrontBack(1.2f*SPEED_MASTER);
    328328
     
    383383    void FormationController::searchNewMaster()
    384384    {
    385         if (this->state_==SLAVE) 
     385        if (this->state_==SLAVE)
    386386           return;
    387387        if (!this->getControllableEntity())
     
    394394        for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it)
    395395        {
    396            
     396
    397397            //same team?
    398398            Gametype* gt=this->getGametype();
     
    479479                 bool left=true;
    480480            int i = 1;
    481            
     481
    482482            for(std::vector<FormationController*>::iterator it = slaves_.begin(); it != slaves_.end(); it++)
    483483            {
     
    490490                    i++;
    491491                    dest+=FORMATION_LENGTH*(orient*WorldEntity::BACK);
    492                 }               
     492                }
    493493                (*it)->setTargetOrientation(orient);
    494494                (*it)->setTargetPosition(pos);
     
    599599
    600600        if (this->state_==SLAVE)  //become master of this formation
    601         {   
     601        {
    602602            this->slaves_=this->myMaster_->slaves_;
    603603            this->myMaster_->slaves_.clear();
    604604            this->myMaster_->state_=SLAVE;
    605605            this->myMaster_->myMaster_=this;
    606            
     606
    607607            //delete myself in slavelist
    608608            std::vector<FormationController*>::iterator it2 = std::find(this->slaves_.begin(), this->slaves_.end(), this);
     
    647647           if (i>=slaves_.size()/2) break; //half the formation should attack.
    648648       }
    649     }     
     649    }
    650650
    651651
     
    860860    void FormationController::setTargetOrientation(const Quaternion& orient)
    861861    {
    862         this->targetOrientation_=orient;       
     862        this->targetOrientation_=orient;
    863863        this->bHasTargetOrientation_=true;
    864864    }
  • code/trunk/src/orxonox/controllers/FormationController.h

    r9016 r9255  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      ...
    2424 *   Co-authors:
    2525 *      ...
  • code/trunk/src/orxonox/worldentities/ControllableEntity.h

    r9016 r9255  
    166166            inline void setTeam(int team)
    167167                { this->team_ = team; }
    168             inline float getTeam() const
     168            inline int getTeam() const
    169169                { return this->team_; }
    170170
Note: See TracChangeset for help on using the changeset viewer.