[Orxonox-commit 3154] r7847 - code/trunk/src/orxonox/weaponsystem
landauf at orxonox.net
landauf at orxonox.net
Thu Feb 10 17:42:29 CET 2011
Author: landauf
Date: 2011-02-10 17:42:29 +0100 (Thu, 10 Feb 2011)
New Revision: 7847
Modified:
code/trunk/src/orxonox/weaponsystem/Munition.cc
code/trunk/src/orxonox/weaponsystem/WeaponMode.cc
Log:
fixed two bugs regarding the munition
Modified: code/trunk/src/orxonox/weaponsystem/Munition.cc
===================================================================
--- code/trunk/src/orxonox/weaponsystem/Munition.cc 2011-02-10 15:59:00 UTC (rev 7846)
+++ code/trunk/src/orxonox/weaponsystem/Munition.cc 2011-02-10 16:42:29 UTC (rev 7847)
@@ -184,7 +184,7 @@
// We don't stack, so we can only take munition if this is allowed
if (magazine->munition_ > 0 && this->bAllowMultiMunitionRemovementUnderflow_)
{
- magazine->munition_ -= 0;
+ magazine->munition_ = 0;
return true;
}
}
Modified: code/trunk/src/orxonox/weaponsystem/WeaponMode.cc
===================================================================
--- code/trunk/src/orxonox/weaponsystem/WeaponMode.cc 2011-02-10 15:59:00 UTC (rev 7846)
+++ code/trunk/src/orxonox/weaponsystem/WeaponMode.cc 2011-02-10 16:42:29 UTC (rev 7847)
@@ -126,8 +126,10 @@
{
if (this->munition_->reload(this))
{
- if (!this->bParallelReload_)
- reloadtime += this->munition_->getReloadTime();
+ if (this->bParallelReload_)
+ reloadtime = std::max(this->reloadTime_, this->munition_->getReloadTime());
+ else
+ reloadtime = this->reloadTime_ + this->munition_->getReloadTime();
}
}
More information about the Orxonox-commit
mailing list