Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8859 for code


Ignore:
Timestamp:
Aug 23, 2011, 12:58:21 AM (13 years ago)
Author:
landauf
Message:

fixed build for MSVC: "only static const integral data members can be initialized within a class"

Location:
code/trunk/src/modules/weapons/projectiles
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/weapons/projectiles/SimpleRocket.cc

    r8858 r8859  
    5252namespace orxonox
    5353{
    54 
    5554    CreateFactory(SimpleRocket);
     55
     56    const float SimpleRocket::FUEL_PERCENTAGE = 0.8f;
    5657
    5758    SimpleRocket::SimpleRocket(BaseObject* creator)
     
    9596            collisionShape->setHeight(5);
    9697            this->attachCollisionShape(collisionShape);
    97            
     98
    9899            this->destroyTimer_.setTimer(this->lifetime_, false, createExecutor(createFunctor(&BasicProjectile::destroyObject, this)));
    99100        }
     
    115116    {
    116117        SUPER(SimpleRocket, tick, dt);
    117        
     118
    118119        if (GameMode::isMaster())
    119120        {
     
    167168    {
    168169        BasicProjectile::setShooter(shooter);
    169        
     170
    170171        this->player_ = this->getShooter()->getPlayer();
    171172    }
  • code/trunk/src/modules/weapons/projectiles/SimpleRocket.h

    r8855 r8859  
    122122
    123123        private:
    124             static const float FUEL_PERCENTAGE = 0.8f; //!< Percentage of lifetime the rocket has fuel
    125            
     124            static const float FUEL_PERCENTAGE; //!< Percentage of lifetime the rocket has fuel
     125
    126126            Vector3 localAngularVelocity_; //!< Variable to temporarily store accumulated steering command input.
    127127            bool fuel_; //!< Bool is true while the rocket "has fuel"
Note: See TracChangeset for help on using the changeset viewer.