Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11028 for code/branches


Ignore:
Timestamp:
Jan 3, 2016, 8:47:51 PM (9 years ago)
Author:
landauf
Message:

fixed compiler error (MSVC): static members with non-integral type must be initialized in the .cc file
using upper-case letters for constants.

Location:
code/branches/presentationHS15/src/orxonox/controllers
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentationHS15/src/orxonox/controllers/ArtificialController.cc

    r10631 r11028  
    9494            return;
    9595
    96         static const float hardcoded_projectile_speed = 750;
    97 
    98         this->targetPosition_ = getPredictedPosition(this->getControllableEntity()->getWorldPosition(), hardcoded_projectile_speed, this->target_->getWorldPosition(), this->target_->getVelocity());
     96        static const float HARDCODED_PROJECTILE_SPEED = 750;
     97
     98        this->targetPosition_ = getPredictedPosition(this->getControllableEntity()->getWorldPosition(), HARDCODED_PROJECTILE_SPEED, this->target_->getWorldPosition(), this->target_->getVelocity());
    9999        this->bHasTargetPosition_ = (this->targetPosition_ != Vector3::ZERO);
    100100
  • code/branches/presentationHS15/src/orxonox/controllers/CommonController.cc

    r11026 r11028  
    3838namespace orxonox
    3939{
     40    const float CommonController::HARDCODED_PROJECTILE_SPEED = 750;
    4041
    4142    RegisterClass(CommonController);
  • code/branches/presentationHS15/src/orxonox/controllers/CommonController.h

    r11026 r11028  
    4545
    4646        public:
    47             static const float hardcoded_projectile_speed = 750;        //<! FightingController uses it to predict enemy position
     47            static const float HARDCODED_PROJECTILE_SPEED; //<! FightingController uses it to predict enemy position
    4848
    4949            CommonController(Context* context);
  • code/branches/presentationHS15/src/orxonox/controllers/FightingController.cc

    r11026 r11028  
    206206            return false;
    207207        Vector3 newPositionOfTarget = getPredictedPosition(this->getControllableEntity()->getWorldPosition(),
    208                                                            hardcoded_projectile_speed, this->target_->getWorldPosition(),
     208                                                           HARDCODED_PROJECTILE_SPEED, this->target_->getWorldPosition(),
    209209                                                           this->target_->getVelocity());
    210210        if (!this->target_ || !this->getControllableEntity())
  • code/branches/presentationHS15/src/orxonox/controllers/FlyingController.cc

    r11026 r11028  
    3737namespace orxonox
    3838{   
     39    const float FlyingController::SPEED = 0.9f/0.02f;
     40    const float FlyingController::ROTATEFACTOR = 0.6f/0.02f;
     41
    3942    RegisterClass (FlyingController);
    4043   
  • code/branches/presentationHS15/src/orxonox/controllers/FlyingController.h

    r11026 r11028  
    5353
    5454        public:
    55             static const float SPEED = 0.9f/0.02f;              //<! ship's speed
    56             static const float ROTATEFACTOR = 0.6f/0.02f;       //<! ship's rotation factor
     55            static const float SPEED;              //<! ship's speed
     56            static const float ROTATEFACTOR;       //<! ship's rotation factor
    5757 
    5858            FlyingController(Context* context);
Note: See TracChangeset for help on using the changeset viewer.