Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7847


Ignore:
Timestamp:
Feb 10, 2011, 5:42:29 PM (14 years ago)
Author:
landauf
Message:

fixed two bugs regarding the munition

Location:
code/trunk/src/orxonox/weaponsystem
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/weaponsystem/Munition.cc

    r7284 r7847  
    185185                    if (magazine->munition_ > 0 && this->bAllowMultiMunitionRemovementUnderflow_)
    186186                    {
    187                         magazine->munition_ -= 0;
     187                        magazine->munition_ = 0;
    188188                        return true;
    189189                    }
  • code/trunk/src/orxonox/weaponsystem/WeaponMode.cc

    r7163 r7847  
    127127                if (this->munition_->reload(this))
    128128                {
    129                     if (!this->bParallelReload_)
    130                         reloadtime += this->munition_->getReloadTime();
     129                    if (this->bParallelReload_)
     130                        reloadtime = std::max(this->reloadTime_, this->munition_->getReloadTime());
     131                    else
     132                        reloadtime = this->reloadTime_ + this->munition_->getReloadTime();
    131133                }
    132134            }
Note: See TracChangeset for help on using the changeset viewer.