[Orxonox-commit 277] r2924 - branches/weapons/src/orxonox/objects/weaponsystem

landauf at orxonox.net landauf at orxonox.net
Sat Apr 18 19:28:41 CEST 2009


Author: landauf
Date: 2009-04-18 19:28:41 +0200 (Sat, 18 Apr 2009)
New Revision: 2924

Modified:
   branches/weapons/src/orxonox/objects/weaponsystem/WeaponMode.cc
Log:
fixed a small bug concerning the muzzle offset. it makes much more sense now.

Modified: branches/weapons/src/orxonox/objects/weaponsystem/WeaponMode.cc
===================================================================
--- branches/weapons/src/orxonox/objects/weaponsystem/WeaponMode.cc	2009-04-18 17:21:36 UTC (rev 2923)
+++ branches/weapons/src/orxonox/objects/weaponsystem/WeaponMode.cc	2009-04-18 17:28:41 UTC (rev 2924)
@@ -197,7 +197,7 @@
     Vector3 WeaponMode::getMuzzlePosition() const
     {
         if (this->weapon_)
-            return (this->weapon_->getWorldPosition() + this->muzzleOffset_);
+            return (this->weapon_->getWorldPosition() + this->weapon_->getWorldOrientation() * this->muzzleOffset_);
         else
             return this->muzzleOffset_;
     }




More information about the Orxonox-commit mailing list