Index: trunk/src/world_entities/player.cc
===================================================================
--- trunk/src/world_entities/player.cc	(revision 5555)
+++ trunk/src/world_entities/player.cc	(revision 5556)
@@ -23,7 +23,7 @@
 #include "factory.h"
 
-#include "weapon_manager.h"
-#include "test_gun.h"
-#include "turret.h"
+#include "weapons/weapon_manager.h"
+#include "weapons/test_gun.h"
+#include "weapons/turret.h"
 
 #include "list.h"
Index: trunk/src/world_entities/weapons/aim.cc
===================================================================
--- trunk/src/world_entities/weapons/aim.cc	(revision 5556)
+++ trunk/src/world_entities/weapons/aim.cc	(revision 5556)
@@ -0,0 +1,167 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Benjamin Grauer
+   co-programmer: ...
+*/
+
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WEAPON
+
+#include "aim.h"
+
+#include "load_param.h"
+#include "graphics_engine.h"
+#include "glincl.h"
+#include "state.h"
+#include "material.h"
+
+using namespace std;
+
+
+/**
+ * standart constructor
+ */
+Aim::Aim (const TiXmlElement* root)
+{
+  this->init();
+
+  if (root)
+    this->loadParams(root);
+  else
+    this->setTexture("maps/aim.png");
+}
+
+/**
+ * destroys a Aim
+*/
+Aim::~Aim ()
+{
+  if (this->material)
+  delete this->material;
+
+  // delete what has to be deleted here
+
+  GraphicsEngine::showMouse(true);
+  GraphicsEngine::stealWMEvents(false);
+}
+
+/**
+ * initializes the Aim
+ */
+void Aim::init()
+{
+  this->setClassID(CL_CROSSHAIR, "Aim");
+  this->setName("Aim");
+
+  this->setLayer(E2D_LAYER_TOP);
+  this->setRotationSpeed(5);
+  this->setSize(GraphicsEngine::getInstance()->getResolutionX()/10.0);
+
+//  this->setBindNode(this);
+  this->material = new Material;
+
+  // center the mouse on the screen, and also hide the cursors
+  SDL_WarpMouse(GraphicsEngine::getInstance()->getResolutionX()/2, GraphicsEngine::getInstance()->getResolutionY()/2);
+  GraphicsEngine::showMouse(false);
+  GraphicsEngine::stealWMEvents(true);
+}
+
+
+void Aim::loadParams(const TiXmlElement* root)
+{
+  static_cast<PNode*>(this)->loadParams(root);
+
+  LoadParam<Aim>(root, "texture", this, &Aim::setTexture)
+      .describe("the texture-file to load onto the Aim");
+
+  LoadParam<Aim>(root, "size", this, &Aim::setSize)
+      .describe("the size of the Aim in Pixels");
+
+  LoadParam<Aim>(root, "rotation-speed", this, &Aim::setRotationSpeed)
+      .describe("the Speed with which the Aim should rotate");
+}
+
+
+/**
+ * sets the size of the Aim.
+ * @param size the size in pixels
+ */
+void Aim::setSize(float size)
+{
+  this->setSize2D(size/2, size/2);
+}
+
+/**
+ * sets the material to load
+ * @param textureFile The texture-file to load onto the crosshair
+ */
+void Aim::setTexture(const char* textureFile)
+{
+  this->material->setDiffuseMap(textureFile);
+}
+
+/**
+ * ticks the Aim
+ * @param dt the time to ticks
+ */
+void Aim::tick(float dt)
+{
+  // let the crosshair rotate
+  this->shiftDir2D(dt * rotationSpeed);
+
+
+  float z = 0.0f;
+  glReadPixels ((int)this->getAbsCoor2D().x,
+                 GraphicsEngine::getInstance()->getResolutionY()-(int)this->getAbsCoor2D().y-1,
+                 1,
+                 1,
+                 GL_DEPTH_COMPONENT,
+                 GL_FLOAT,
+                 &z);
+
+
+  GLdouble objX=.0, objY=.0, objZ=.0;
+  gluUnProject(this->getAbsCoor2D().x,
+               GraphicsEngine::getInstance()->getResolutionY()-this->getAbsCoor2D().y-1,
+               .99,  // z
+               GraphicsEngine::modMat,
+               GraphicsEngine::projMat,
+               GraphicsEngine::viewPort,
+               &objX,
+               &objY,
+               &objZ );
+
+  this->setAbsCoor(objX, objY, objZ);
+}
+
+/**
+ * draws the crosshair
+ */
+void Aim::draw() const
+{
+  glPushMatrix();
+  glTranslatef(this->getAbsCoor2D().x, this->getAbsCoor2D().y, 0);
+
+  glRotatef(this->getAbsDir2D(), 0,0,1);
+  this->material->select();
+  glBegin(GL_TRIANGLE_STRIP);
+  glTexCoord2f(0, 0);
+  glVertex2f(-this->getSizeX2D(), -this->getSizeY2D());
+  glTexCoord2f(1, 0);
+  glVertex2f(this->getSizeX2D(), -this->getSizeY2D());
+  glTexCoord2f(0, 1);
+  glVertex2f(-this->getSizeX2D(), this->getSizeY2D());
+  glTexCoord2f(1, 1);
+  glVertex2f(this->getSizeX2D(), this->getSizeY2D());
+  glEnd();
+  glPopMatrix();
+
+}
Index: trunk/src/world_entities/weapons/aim.h
===================================================================
--- trunk/src/world_entities/weapons/aim.h	(revision 5556)
+++ trunk/src/world_entities/weapons/aim.h	(revision 5556)
@@ -0,0 +1,39 @@
+/*!
+ * @file aim.h
+ *  Definition of
+ */
+
+#ifndef _AIM_H
+#define _AIM_H
+
+#include "p_node.h"
+#include "element_2d.h"
+// FORWARD DECLARATION
+class Model;
+class Material;
+class TiXmlElement;
+
+//! An Aim for zooming in on Targets.
+class Aim : public PNode, public Element2D {
+
+ public:
+  Aim(const TiXmlElement* root = NULL);
+  virtual ~Aim();
+
+  void init();
+  void loadParams(const TiXmlElement* root);
+
+  void setSize(float size);
+  void setTexture(const char* textureFile);
+  /** @param rotationSpeed the speed at what the crosshair should rotate */
+  void setRotationSpeed(float rotationSpeed) { this->rotationSpeed = rotationSpeed; };
+
+  virtual void tick(float dt);
+  virtual void draw() const;
+
+ private:
+   Material*        material;             //!< a material for the Aim.
+   float            rotationSpeed;        //!< Speed of the Rotation.
+};
+
+#endif /* _AIM_H */
