Index: /code/branches/steering/src/modules/weapons/weaponmodes/HsW01.cc
===================================================================
--- /code/branches/steering/src/modules/weapons/weaponmodes/HsW01.cc	(revision 6054)
+++ /code/branches/steering/src/modules/weapons/weaponmodes/HsW01.cc	(revision 6055)
@@ -111,9 +111,8 @@
         model->setScale(5);
 
-        //projectile->setOrientation(this->getMuzzleOrientation());
-        projectile->lookAt(this->getTarget(), WorldEntity::World);
+        this->computeMuzzleParameters();
+        projectile->setOrientation(this->getMuzzleOrientation());
         projectile->setPosition(this->getMuzzlePosition());
-        projectile->setVelocity((projectile->getOrientation() * Vector3::UNIT_Z) * this->speed_); //getWorldOrientation??
-        //projectile->setVelocity(this->getMuzzleDirection() * this->speed_);
+        projectile->setVelocity(this->getMuzzleDirection() * this->speed_);
 
         projectile->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
Index: /code/branches/steering/src/orxonox/controllers/Controller.cc
===================================================================
--- /code/branches/steering/src/orxonox/controllers/Controller.cc	(revision 6054)
+++ /code/branches/steering/src/orxonox/controllers/Controller.cc	(revision 6055)
@@ -46,7 +46,3 @@
     {
     }
-
-    Vector3 Controller::getTarget() {
-        return this->controllableEntity_->getPosition() + (this->controllableEntity_->getOrientation() * Vector3::UNIT_Z);
-    }
 }
Index: /code/branches/steering/src/orxonox/controllers/Controller.h
===================================================================
--- /code/branches/steering/src/orxonox/controllers/Controller.h	(revision 6054)
+++ /code/branches/steering/src/orxonox/controllers/Controller.h	(revision 6055)
@@ -58,5 +58,8 @@
             virtual void changedControllableEntity() {}
 
-            virtual Vector3 getTarget();
+            virtual bool canFindTarget()
+                { return false; }
+            virtual Vector3 getTarget()
+                { return Vector3::ZERO; }
 
         protected:
Index: /code/branches/steering/src/orxonox/controllers/NewHumanController.cc
===================================================================
--- /code/branches/steering/src/orxonox/controllers/NewHumanController.cc	(revision 6054)
+++ /code/branches/steering/src/orxonox/controllers/NewHumanController.cc	(revision 6055)
@@ -37,16 +37,12 @@
 #include "core/ConsoleCommand.h"
 #include "worldentities/ControllableEntity.h"
-#include "worldentities/pawns/Pawn.h"
-#include "gametypes/Gametype.h"
 #include "infos/PlayerInfo.h"
-#include "overlays/Map.h"
+#include "overlays/OrxonoxOverlay.h"
 #include "graphics/Camera.h"
 #include "sound/SoundManager.h"
-#include "Radar.h"
 #include "Scene.h"
 
 namespace orxonox
 {
-
     CreateUnloadableFactory(NewHumanController);
 
@@ -55,23 +51,28 @@
         RegisterObject(NewHumanController);
 
-        overlaySize = 0.08;
+        overlaySize_ = 0.08;
+        controlMode_ = 0;
 
-        controlMode = 0;
+        crossHairOverlay_ = new OrxonoxOverlay(this);
+        crossHairOverlay_->setBackgroundMaterial("Orxonox/Crosshair3");
+        crossHairOverlay_->setSize(Vector2(overlaySize_, overlaySize_));
+        crossHairOverlay_->show();
 
-        CrossHairOverlay = new OrxonoxOverlay(this);
-        CrossHairOverlay->setBackgroundMaterial("Orxonox/Crosshair3");
-        CrossHairOverlay->setSize(Vector2(overlaySize,overlaySize));
-        CrossHairOverlay->show();
+        // HACK: Define which objects are targettable when considering the creator of an orxonox::Model
+        this->targetMask_.exclude(ClassByString("BaseObject"));
+        this->targetMask_.include(ClassByString("WorldEntity"));
+        this->targetMask_.exclude(ClassByString("Projectile"));
     }
 
     NewHumanController::~NewHumanController()
     {
-        if( this->isInitialized() )
+        if (this->isInitialized())
         {
         }
     }
 
-    void NewHumanController::tick(float dt) {
-        CrossHairOverlay->setPosition(Vector2(static_cast<float>(this->currentYaw_)/2*-1+.5-overlaySize/2, static_cast<float>(this->currentPitch_)/2*-1+.5-overlaySize/2));
+    void NewHumanController::tick(float dt)
+    {
+        crossHairOverlay_->setPosition(Vector2(static_cast<float>(this->currentYaw_)/2*-1+.5-overlaySize_/2, static_cast<float>(this->currentPitch_)/2*-1+.5-overlaySize_/2));
 
         HumanController::tick(dt);
@@ -99,69 +100,76 @@
 
 /*
-
- // Get results, create a node/entity on the position
- for ( itr = result.begin(); itr != result.end(); itr++ )
- {
-     if (itr->movable && itr->movable->getName() == "Head")
-     {
-         soundMgr->StopSound( &jaguarSoundChannel );
-         soundMgr->PlaySound( jaguarSound, headNode, &jaguarSoundChannel );
-         break;
-     } // if
- }
+        // Get results, create a node/entity on the position
+        for ( itr = result.begin(); itr != result.end(); itr++ )
+        {
+            if (itr->movable && itr->movable->getName() == "Head")
+            {
+                soundMgr->StopSound( &jaguarSoundChannel );
+                soundMgr->PlaySound( jaguarSound, headNode, &jaguarSoundChannel );
+                break;
+            } // if
+        }
 */
 
-            HumanController::localController_s->getControllableEntity()->fire(firemode);
-        //}
-//}
+        HumanController::localController_s->getControllableEntity()->fire(firemode);
     }
 
-    Vector3 NewHumanController::getTarget() {
-            Ogre::RaySceneQuery * rsq = HumanController::localController_s->getControllableEntity()->getScene()->getSceneManager()->createRayQuery(Ogre::Ray());
+    Vector3 NewHumanController::getTarget()
+    {
+        Ogre::RaySceneQuery * rsq = HumanController::localController_s->getControllableEntity()->getScene()->getSceneManager()->createRayQuery(Ogre::Ray());
 
-//std::cout << "X: " << static_cast<float>(this->currentYaw_)/2*-1+.5 << "  Y: " << static_cast<float>(this->currentPitch_)/2*-1+.5 << endl;
+        //std::cout << "X: " << static_cast<float>(this->currentYaw_)/2*-1+.5 << "  Y: " << static_cast<float>(this->currentPitch_)/2*-1+.5 << endl;
 
-            Ogre::Ray mouseRay = HumanController::localController_s->getControllableEntity()->getCamera()->getCamera()->getCameraToViewportRay(static_cast<float>(this->currentYaw_)/2*-1+.5, static_cast<float>(this->currentPitch_)/2*-1+.5);
+        Ogre::Ray mouseRay = HumanController::localController_s->getControllableEntity()->getCamera()->getCamera()->getCameraToViewportRay(static_cast<float>(this->currentYaw_)/2*-1+.5, static_cast<float>(this->currentPitch_)/2*-1+.5);
 
-            rsq->setRay(mouseRay);
-            rsq->setSortByDistance(true);
+        rsq->setRay(mouseRay);
+        rsq->setSortByDistance(true);
 
-/*
-Distance of objects:
-ignore everything under 200 maybe even take 1000 as min distance to shoot at
+        /*
+        Distance of objects:
+        ignore everything under 200 maybe even take 1000 as min distance to shoot at
 
-shots are regularly traced and are entities!!!!!!!!! this is the biggest problem
-they vanish only after a distance of 10'000
-*/
+        shots are regularly traced and are entities!!!!!!!!! this is the biggest problem
+        they vanish only after a distance of 10'000
+        */
 
 
-            Ogre::RaySceneQueryResult &result = rsq->execute();
+        Ogre::RaySceneQueryResult& result = rsq->execute();
 
-            Ogre::RaySceneQueryResult::iterator itr;
-            for ( itr = result.begin(); itr != result.end(); itr++ )
+        Ogre::RaySceneQueryResult::iterator itr;
+        for (itr = result.begin(); itr != result.end(); ++itr)
+        {
+            //std::cout << "distance: " << itr->distance << "  name: " << itr->movable->getName() << " type: " << itr->movable->getMovableType();
+            if (itr->movable->isInScene() && itr->movable->getMovableType() == "Entity" && itr->distance > 500)
             {
-                //std::cout << "distance: " << itr->distance << "  name: " << itr->movable->getName() << " type: " << itr->movable->getMovableType();
-                if (itr->movable->isInScene() && itr->movable->getMovableType() == "Entity" && itr->distance > 500) {
-                    //std::cout << "  TAGGED";
-                    itr->movable->getParentSceneNode()->showBoundingBox(true);
-std::cout << itr->movable->getParentSceneNode()->_getDerivedPosition() << endl;
-return itr->movable->getParentSceneNode()->_getDerivedPosition();
+                // Try to cast the user pointer
+                WorldEntity* wePtr = dynamic_cast<WorldEntity*>(itr->movable->getUserObject());
+                if (wePtr)
+                {
+                    BaseObject* creator = wePtr->getCreator();
+                    if (this->targetMask_.isExcluded(creator->getIdentifier()))
+                        continue;
                 }
-                //std::cout << endl;
+                //std::cout << "  TAGGED";
+                itr->movable->getParentSceneNode()->showBoundingBox(true);
+                std::cout << itr->movable->getParentSceneNode()->_getDerivedPosition() << endl;
+                return itr->movable->getParentSceneNode()->_getDerivedPosition();
             }
+            //std::cout << endl;
+        }
 
-//if (result.front().movable->isInScene()) std::cout << "in scene" << endl;
-// && result.front().movable->getParentSceneNode() != NULL) result.front().movable->getParentSceneNode()->showBoundingBox(true);
-//result.front().movable->setVisible(false);
+        //if (result.front().movable->isInScene()) std::cout << "in scene" << endl;
+        // && result.front().movable->getParentSceneNode() != NULL) result.front().movable->getParentSceneNode()->showBoundingBox(true);
+        //result.front().movable->setVisible(false);
 
-            //std::cout << endl;
+        //std::cout << endl;
 /*
-            if (!result.empty()) {
-            	Ogre::RaySceneQueryResultEntry obj = result.front();
-            	std::cout << "distance: " << obj.distance << "  name: " << obj.movable->getName() << endl;
-            }
+        if (!result.empty()) {
+            Ogre::RaySceneQueryResultEntry obj = result.front();
+            std::cout << "distance: " << obj.distance << "  name: " << obj.movable->getName() << endl;
+        }
 */
-        return this->controllableEntity_->getWorldPosition() + (this->controllableEntity_->getWorldOrientation() * Vector3::NEGATIVE_UNIT_Z);
-//return this->controllableEntity_->getWorldPosition() + (this->controllableEntity_->getCamera()->getCamera()->getOrientation() * Vector3::NEGATIVE_UNIT_Z);
+        return this->controllableEntity_->getWorldPosition() + (this->controllableEntity_->getWorldOrientation() * Vector3::NEGATIVE_UNIT_Z * 100);
+        //return this->controllableEntity_->getWorldPosition() + (this->controllableEntity_->getCamera()->getCamera()->getOrientation() * Vector3::NEGATIVE_UNIT_Z);
     }
 
@@ -174,4 +182,5 @@
         //std::cout << "Y: " << static_cast<float>(this->currentPitch_) << " X: " << static_cast<float>(this->currentYaw_) << endl;
     }
+
     void NewHumanController::pitch(const Vector2& value)
     {
@@ -182,4 +191,3 @@
         //std::cout << "Y: " << static_cast<float>(this->currentPitch_) << " X: " << static_cast<float>(this->currentYaw_) << endl;
     }
-
 }
Index: /code/branches/steering/src/orxonox/controllers/NewHumanController.h
===================================================================
--- /code/branches/steering/src/orxonox/controllers/NewHumanController.h	(revision 6054)
+++ /code/branches/steering/src/orxonox/controllers/NewHumanController.h	(revision 6055)
@@ -32,7 +32,6 @@
 #include "OrxonoxPrereqs.h"
 
+#include "core/ClassTreeMask.h"
 #include "HumanController.h"
-#include "overlays/OrxonoxOverlay.h"
-#include "util/OgreForwardRefs.h"
 
 namespace orxonox
@@ -53,4 +52,5 @@
             void changeMode(unsigned int controleMode);
 
+            virtual bool canFindTarget() { return true; }
             virtual Vector3 getTarget();
 
@@ -58,7 +58,8 @@
             float                       currentYaw_;
             float                       currentPitch_;
-            OrxonoxOverlay              *CrossHairOverlay;
-            float			overlaySize;
-            unsigned int                controlMode;
+            OrxonoxOverlay*             crossHairOverlay_;
+            float			            overlaySize_;
+            unsigned int                controlMode_;
+            ClassTreeMask               targetMask_;
     };
 }
Index: /code/branches/steering/src/orxonox/infos/PlayerInfo.cc
===================================================================
--- /code/branches/steering/src/orxonox/infos/PlayerInfo.cc	(revision 6054)
+++ /code/branches/steering/src/orxonox/infos/PlayerInfo.cc	(revision 6055)
@@ -138,5 +138,6 @@
         assert(this->controller_);
         this->controller_->setPlayer(this);
-        if (this->controllableEntity_) {
+        if (this->controllableEntity_)
+        {
             this->controller_->setControllableEntity(this->controllableEntity_);
             this->controllableEntity_->setController(this->controller_);
@@ -160,5 +161,6 @@
         this->bReadyToSpawn_ &= (!this->bSetUnreadyAfterSpawn_);
 
-        if (this->controller_) {
+        if (this->controller_)
+        {
             this->controller_->setControllableEntity(entity);
             this->controllableEntity_->setController(this->controller_);
Index: /code/branches/steering/src/orxonox/weaponsystem/WeaponMode.cc
===================================================================
--- /code/branches/steering/src/orxonox/weaponsystem/WeaponMode.cc	(revision 6054)
+++ /code/branches/steering/src/orxonox/weaponsystem/WeaponMode.cc	(revision 6055)
@@ -32,4 +32,6 @@
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
+#include "controllers/Controller.h"
+#include "worldentities/pawns/Pawn.h"
 
 #include "Munition.h"
@@ -194,24 +196,30 @@
     }
 
-    Vector3 WeaponMode::getMuzzlePosition() const
+    void WeaponMode::computeMuzzleParameters()
     {
         if (this->weapon_)
-            return (this->weapon_->getWorldPosition() + this->weapon_->getWorldOrientation() * this->muzzleOffset_);
-        else
-            return this->muzzleOffset_;
-    }
-
-    const Quaternion& WeaponMode::getMuzzleOrientation() const
+        {
+            this->muzzlePosition_ = this->weapon_->getWorldPosition() + this->weapon_->getWorldOrientation() * this->muzzleOffset_;
+
+            Controller* controller = this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getController();
+            if (controller->canFindTarget())
+            {
+                Vector3 muzzleDirection(controller->getTarget() - this->muzzlePosition_);
+                this->muzzleOrientation_ = this->weapon_->getWorldOrientation() * (this->weapon_->getWorldOrientation() * WorldEntity::FRONT).getRotationTo(muzzleDirection);
+            }
+            else
+                this->muzzleOrientation_ = this->weapon_->getWorldOrientation();
+        }
+        else
+        {
+            this->muzzlePosition_ = this->muzzleOffset_;
+            this->muzzleOrientation_ = Quaternion::IDENTITY;
+        }
+    }
+
+    Vector3 WeaponMode::getMuzzleDirection() const
     {
         if (this->weapon_)
-            return this->weapon_->getWorldOrientation();
-        else
-            return Quaternion::IDENTITY;
-    }
-
-    Vector3 WeaponMode::getMuzzleDirection() const
-    {
-        if (this->weapon_)
-            return (this->weapon_->getWorldOrientation() * WorldEntity::FRONT);
+            return (this->getMuzzleOrientation() * WorldEntity::FRONT);
         else
             return WorldEntity::FRONT;
Index: /code/branches/steering/src/orxonox/weaponsystem/WeaponMode.h
===================================================================
--- /code/branches/steering/src/orxonox/weaponsystem/WeaponMode.h	(revision 6054)
+++ /code/branches/steering/src/orxonox/weaponsystem/WeaponMode.h	(revision 6055)
@@ -38,10 +38,4 @@
 #include "core/SubclassIdentifier.h"
 #include "tools/Timer.h"
-
-#include "weaponsystem/Weapon.h"
-#include "weaponsystem/WeaponPack.h"
-#include "weaponsystem/WeaponSystem.h"
-#include "worldentities/pawns/Pawn.h"
-#include "controllers/Controller.h"
 
 namespace orxonox
@@ -115,6 +109,9 @@
                 { return this->muzzleOffset_; }
 
-            Vector3 getMuzzlePosition() const;
-            const Quaternion& getMuzzleOrientation() const;
+            void computeMuzzleParameters();
+            const Vector3& getMuzzlePosition() const
+                { return this->muzzlePosition_; }
+            const Quaternion& getMuzzleOrientation() const
+                { return this->muzzleOrientation_; }
             Vector3 getMuzzleDirection() const;
 
@@ -131,6 +128,5 @@
                 { return this->mode_; }
 
-            inline Vector3 getTarget()
-                { return this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getController()->getTarget(); }
+            Vector3 getTarget();
 
         protected:
@@ -161,4 +157,7 @@
             Timer reloadTimer_;
             bool bReloading_;
+
+            Vector3 muzzlePosition_;
+            Quaternion muzzleOrientation_;
     };
 }
Index: /code/branches/steering/src/orxonox/worldentities/ControllableEntity.h
===================================================================
--- /code/branches/steering/src/orxonox/worldentities/ControllableEntity.h	(revision 6054)
+++ /code/branches/steering/src/orxonox/worldentities/ControllableEntity.h	(revision 6055)
@@ -142,6 +142,6 @@
             inline Controller* getController() const
                 { return this->controller_; }
-            inline void setController(Controller* c)
-                { this->controller_ = c; }
+            inline void setController(Controller* val)
+                { this->controller_ = val; }
 
         protected:
Index: /code/branches/steering/src/orxonox/worldentities/WorldEntity.cc
===================================================================
--- /code/branches/steering/src/orxonox/worldentities/WorldEntity.cc	(revision 6054)
+++ /code/branches/steering/src/orxonox/worldentities/WorldEntity.cc	(revision 6055)
@@ -654,5 +654,5 @@
     /**
     @brief
-        Makes this WorldEntity look a specific target location.
+        Makes this WorldEntity look at a specific target location.
     @param relativeTo
         @see WorldEntity::TransformSpace
