Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 30, 2015, 7:51:49 PM (9 years ago)
Author:
fvultier
Message:

The weapon system HUD rescales properly if the window size changes.

Location:
code/branches/fabienHS15/src/orxonox
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/fabienHS15/src/orxonox/overlays/OrxonoxOverlay.cc

    r10624 r10724  
    450450        tempTx->setColourOperationEx(Ogre::LBX_MODULATE, Ogre::LBS_MANUAL, Ogre::LBS_CURRENT, colour);
    451451    }
     452
     453    void OrxonoxOverlay::setZOrder(unsigned short order)
     454    {
     455        if (this->overlay_)
     456        {
     457            this->overlay_->setZOrder(order);
     458        }
     459    }
    452460}
  • code/branches/fabienHS15/src/orxonox/overlays/OrxonoxOverlay.h

    r10721 r10724  
    186186        virtual void changedOverlayGroup()
    187187            { this->changedVisibility(); }
     188        virtual void setZOrder(unsigned short order);
    188189
    189190    protected:
  • code/branches/fabienHS15/src/orxonox/weaponsystem/Munition.cc

    r10721 r10724  
    351351
    352352                // If there was no change in a loop, all magazines are full (or locked due to loading)
    353                 // Because the first loop does not stat at the beginning of the map we have to treat is separately
     353                // Because the first loop does not start at the beginning of the map we have to treat is separately
    354354                if (!change && !firstLoop)
    355355                {
  • code/branches/fabienHS15/src/orxonox/weaponsystem/Munition.h

    r10713 r10724  
    7878            inline unsigned int getMaxMunitionPerMagazine() const
    7979                { return this->maxMunitionPerMagazine_; }
    80             inline bool getUseSeparateMagazines() const
    81                 { return deployment_ == MunitionDeployment::Separate; }
    82             inline bool getStackMunition() const
    83                 { return deployment_ == MunitionDeployment::Stack; }
     80            inline MunitionDeployment::Value getMunitionDeployment() const
     81                { return deployment_; }
     82
    8483
    8584            bool canTakeMunition(unsigned int amount, WeaponMode* user) const;
  • code/branches/fabienHS15/src/orxonox/worldentities/pawns/SpaceShip.cc

    r10216 r10724  
    297297        }
    298298    }
     299
     300    void SpaceShip::gainBoostPower(float gainedBoostPower)
     301    {
     302        this->boostPower_ += gainedBoostPower;
     303       
     304        if (this->boostPower_ > this->initialBoostPower_)
     305        {
     306            this->boostPower_ = this->initialBoostPower_;
     307        }
     308
     309        // If the booster is in cooldown mode and we gained boost power, the abort the cooldown.
     310        if (this->isBoostCoolingDown() && this->boostPower_ > 0.0f)
     311        {
     312            timer_.stopTimer();
     313            this->boostCooledDown();
     314        }
     315    }
     316
    299317    /**
    300318    @brief
  • code/branches/fabienHS15/src/orxonox/worldentities/pawns/SpaceShip.h

    r10437 r10724  
    250250            inline float getShakeAmplitude() const
    251251                { return this->shakeAmplitude_; }
     252            /**
     253            @brief Add boost power. Is non-negative.
     254            @return Returns the current boost power.
     255            */
     256            void gainBoostPower(float gainedBoostPower);
    252257
    253258        protected:
Note: See TracChangeset for help on using the changeset viewer.