Index: orxonox/trunk/src/lib/graphics/graphics_engine.cc
===================================================================
--- orxonox/trunk/src/lib/graphics/graphics_engine.cc	(revision 4829)
+++ orxonox/trunk/src/lib/graphics/graphics_engine.cc	(revision 4830)
@@ -67,8 +67,44 @@
 }
 
+/**
+ * initializes the GraphicsEngine with default settings.
+ */
 int GraphicsEngine::init()
 {
-  this->initVideo(640,480,16);
-}
+  if (this->isInit)
+    return -1;
+  this->initVideo(640, 480, 16);
+  this->isInit = true;
+}
+
+/**
+ * loads the GraphicsEngine's settings from a given ini-file and section
+ * @param iniParser the iniParser to load from
+ * @param section the Section in the ini-file to load from
+ * @returns nothing usefull
+ */
+int GraphicsEngine::initFromIniFile(IniParser* iniParser)
+{
+
+  // looking if we are in fullscreen-mode
+  const char* fullscreen = iniParser->getVar(CONFIG_NAME_FULLSCREEN, CONFIG_SECTION_VIDEO, "0");
+  if (strchr(fullscreen, '1'))
+    this->fullscreenFlag = SDL_FULLSCREEN;
+
+
+
+  // looking if we are in fullscreen-mode
+  const char* textures = iniParser->getVar(CONFIG_NAME_TEXTURES, CONFIG_SECTION_VIDEO_ADVANCED, "0");
+  if (strchr(textures, '1'))
+    this->texturesEnabled = true;
+  else
+    this->texturesEnabled = false;
+
+  // searching for a usefull resolution
+  SubString resolution(iniParser->getVar(CONFIG_NAME_RESOLUTION, CONFIG_SECTION_VIDEO, "640x480"), 'x');
+  this->initVideo(atoi(resolution.getString(0)), atoi(resolution.getString(1)), 16);
+}
+
+
 
 /**
@@ -123,32 +159,4 @@
 
 /**
- * loads the GraphicsEngine's settings from a given ini-file and section
- * @param iniParser the iniParser to load from
- * @param section the Section in the ini-file to load from
- * @returns nothing usefull
- */
-int GraphicsEngine::initFromIniFile(IniParser* iniParser)
-{
-  // searching for a usefull resolution
-  SubString resolution(iniParser->getVar(CONFIG_NAME_RESOLUTION, CONFIG_SECTION_VIDEO, "640x480"), 'x');
-  this->initVideo(atoi(resolution.getString(0)), atoi(resolution.getString(1)), 16);
-
-  // looking if we are in fullscreen-mode
-  const char* fullscreen = iniParser->getVar(CONFIG_NAME_FULLSCREEN, CONFIG_SECTION_VIDEO, "0");
-  if (strchr(fullscreen, '1'))
-    this->setFullscreen(true);
-
-  // looking if we are in fullscreen-mode
-  const char* textures = iniParser->getVar(CONFIG_NAME_TEXTURES, CONFIG_SECTION_VIDEO_ADVANCED, "0");
-  if (strchr(textures, '1'))
-    this->texturesEnabled = true;
-  else
-    this->texturesEnabled = false;
-
-}
-
-
-
-/**
  * sets the Window Captions and the Name of the icon.
  * @param windowName The name of the Window
Index: orxonox/trunk/src/lib/graphics/importer/model.h
===================================================================
--- orxonox/trunk/src/lib/graphics/importer/model.h	(revision 4829)
+++ orxonox/trunk/src/lib/graphics/importer/model.h	(revision 4830)
@@ -26,6 +26,8 @@
  * \todo implement this stuff
 */
-typedef enum MODEL_TYPE {MODEL_DISPLAY_LIST,
-                         MODEL_VERTEX_ARRAY};
+typedef enum MODEL_TYPE {
+  MODEL_DISPLAY_LIST,
+  MODEL_VERTEX_ARRAY
+};
 
 
@@ -36,8 +38,10 @@
 
 //! an enumerator for VERTEX_FORMAT
-typedef enum VERTEX_FORMAT { VERTEX_ONLY = VERTEX,
-                             VERTEX_NORMAL = NORMAL,
-                             VERTEX_TEXCOORD = TEXCOORD,
-                             VERTEX_TEXCOORD_NORMAL = NORMAL | TEXCOORD };
+typedef enum VERTEX_FORMAT {
+  VERTEX_ONLY = VERTEX,
+  VERTEX_NORMAL = NORMAL,
+  VERTEX_TEXCOORD = TEXCOORD,
+  VERTEX_TEXCOORD_NORMAL = NORMAL | TEXCOORD
+};
 
 ////////////////////
Index: orxonox/trunk/src/lib/graphics/text_engine.cc
===================================================================
--- orxonox/trunk/src/lib/graphics/text_engine.cc	(revision 4829)
+++ orxonox/trunk/src/lib/graphics/text_engine.cc	(revision 4830)
@@ -254,5 +254,5 @@
       glTranslatef(pos.x, pos.y, 0);
 
-      char* tmpText = this->text;
+      const char* tmpText = this->text;
       while (*tmpText != '\0')
         {
@@ -921,9 +921,9 @@
   // drawing all the texts
   tIterator<Text>* textIterator = textList->getIterator();
-  Text* text = textIterator->nextElement();
-  while( text != NULL)
-    {
-      text->draw();
-      text = textIterator->nextElement();
+  Text* drawText = textIterator->nextElement();
+  while( drawText != NULL)
+    {
+      drawText->draw();
+      drawText = textIterator->nextElement();
     }
   delete textIterator;
Index: orxonox/trunk/src/lib/gui/gui_exec.cc
===================================================================
--- orxonox/trunk/src/lib/gui/gui_exec.cc	(revision 4829)
+++ orxonox/trunk/src/lib/gui/gui_exec.cc	(revision 4830)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -16,5 +16,5 @@
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 
@@ -38,5 +38,5 @@
 HashTable* orxonoxFlagHash;
 
-/** 
+/**
     \brief Creates the Exec-Frame
 */
@@ -59,5 +59,5 @@
       CheckButton* alwaysShow;     //!< A CheckButton, for if orxonox should start with or without gui.
       Button* quit;                //!< A Button to quit the Gui without starting orxonox.
-      
+
       start = new Button("Start");
 #ifdef HAVE_GTK2
@@ -73,38 +73,38 @@
       verboseMode = new Menu(CONFIG_NAME_VERBOSE_MODE, "nothing",
 #if DEBUG >=1
-			     "error",
+                             "error",
 #endif
 #if DEBUG >=2
-			     "warning",
+                             "warning",
 #endif
 #if DEBUG >=3
-			     "info",
+                             "info",
 #endif
 #if DEBUG >=4
-			     "debug",
+                             "debug",
 #endif
 #if DEBUG >=5
-			     "heavydebug",
-#endif
-			     "lastItem");
+                             "heavydebug",
+#endif
+                             "lastItem");
       verboseMode->setFlagName("verbose", "v", 2);
       verboseMode->setDescription("Sets the Output Mode", "This Enables Outbug messages\n"
-				  "0: nothing will be displayed, but stuff one cannot do without (eg.GUI)\n"
+                                  "0: nothing will be displayed, but stuff one cannot do without (eg.GUI)\n"
 #if DEBUG >=1
-				  "1: error: outputs all the above and errors"
+                                  "1: error: outputs all the above and errors"
 #endif
 #if DEBUG >=2
-				  "2: warning: outputs all the above plus warnings"
+                                  "2: warning: outputs all the above plus warnings"
 #endif
 #if DEBUG >=3
-				  "3: info: outputs all the above plus Information"
+                                  "3: info: outputs all the above plus Information"
 #endif
 #if DEBUG >=4
-				  "4: debug: displays all the above plus debug information"
+                                  "4: debug: displays all the above plus debug information"
 #endif
 #if DEBUG >=5
-				  "5: heavydebug: displays all the above plus heavy debug information: WARNING: the game will run very slow with this."
-#endif
-				  );
+                                  "5: heavydebug: displays all the above plus heavy debug information: WARNING: the game will run very slow with this."
+#endif
+                                  );
       verboseMode->saveability();
       execBox->fill(verboseMode);
@@ -152,5 +152,5 @@
 
   PRINTF(5)("Config Directory is: %s.\n", this->confDir);
-  //! \todo F** Windows-support
+  //! @todo F** Windows-support
 #ifndef __WIN32__
   mkdir(this->confDir, 0755);
@@ -192,5 +192,5 @@
 }
 
-/** 
+/**
     \brief Saves the configuration-file to the Disk.\n
     \param widget from which Widget on should be saved.
@@ -215,40 +215,40 @@
   int counter = 0;
   while(counter < depth &&((widget->optionType > GUI_NOTHING
-			      &&(static_cast<Option*>(widget)->isSaveable()))
-			     ||(widget->optionType < GUI_NOTHING
-				&& static_cast<Packer*>(widget)->getGroupName())))
+                              &&(static_cast<Option*>(widget)->isSaveable()))
+                             ||(widget->optionType < GUI_NOTHING
+                                && static_cast<Packer*>(widget)->getGroupName())))
     {
       fprintf(this->CONFIG_FILE, "  ", depth);
       counter++;
     }
-  
+
   // check if it is a Packer, and if it is, check if it has a name and if there is something in it.
   if(widget->optionType < GUI_NOTHING)
     {
       if(static_cast<Packer*>(widget)->getGroupName())
-	{
-	  fprintf(CONFIG_FILE, "[%s]\n", static_cast<Packer*>(widget)->getGroupName());
-	  this->writeFileText(static_cast<Packer*>(widget)->down, depth+1);
-	  fprintf(CONFIG_FILE, "\n");
-	}
+        {
+          fprintf(CONFIG_FILE, "[%s]\n", static_cast<Packer*>(widget)->getGroupName());
+          this->writeFileText(static_cast<Packer*>(widget)->down, depth+1);
+          fprintf(CONFIG_FILE, "\n");
+        }
       else
-	{
-	  this->writeFileText(static_cast<Packer*>(widget)->down, depth);
-	}
-    } 
+        {
+          this->writeFileText(static_cast<Packer*>(widget)->down, depth);
+        }
+    }
 
   if(widget->optionType > GUI_NOTHING)
     if (static_cast<Option*>(widget)->isSaveable())
       {
-	char Buffer[256];
-	char* space2under;
-	strcpy(Buffer, static_cast<Option*>(widget)->title);
-	if(strchr(Buffer, '_'))
-	  PRINTF(2)("Optionname %s is not Valid for Saving, because it includes an underscore\n", Buffer);
-	while(space2under = strchr(Buffer, ' '))
-	  {
-	    space2under[0] = '_';
-	  }
-	  fprintf(CONFIG_FILE, "%s = %s\n", Buffer, static_cast<Option*>(widget)->save());
+        char Buffer[256];
+        char* space2under;
+        strcpy(Buffer, static_cast<Option*>(widget)->title);
+        if(strchr(Buffer, '_'))
+          PRINTF(2)("Optionname %s is not Valid for Saving, because it includes an underscore\n", Buffer);
+        while(space2under = strchr(Buffer, ' '))
+          {
+            space2under[0] = '_';
+          }
+          fprintf(CONFIG_FILE, "%s = %s\n", Buffer, static_cast<Option*>(widget)->save());
       }
 
@@ -272,35 +272,36 @@
       char* Value;
       while(fscanf(this->CONFIG_FILE, "%s", Buffer) != EOF)
-	{
-	  // group-search //
-	  if(!strncmp(Buffer, "[", 1))
-	    {
-	      if((groupWidget = locateGroup(widget, Buffer, 1))==NULL)
-		{
-		  PRINTF(2)("!!There is no group called %s in this GUI.\n First best Widget will get the Infos assigned.\n Config-File will be updated in next Save\n", Buffer);
-		  groupWidget = widget;
-		}
-	      else
-		PRINT(5)("Group %s located.\n", static_cast<Packer*>(groupWidget)->groupName);
-	    }
-	  // option-setting //
-	  if(!strcmp(Buffer, "="))
-	    {
-	      char* under2space;
-	      while(under2space = strchr(Variable, '_'))
-		{
-		  sprintf(under2space, " %s", under2space+1);
-		}
-	      
-	      fscanf(this->CONFIG_FILE, "%s", Buffer);
-	      varInfo.variableName = Variable;
-	      varInfo.variableValue = Buffer;
-	      groupWidget->walkThrough(this->readFileText, &varInfo, 0);
-	      sprintf(Variable, "");
-	    }
-	  sprintf(Variable, "%s", Buffer);
-	}
+        {
+          // group-search //
+          if(!strncmp(Buffer, "[", 1))
+            {
+              if((groupWidget = locateGroup(widget, Buffer, 1))==NULL)
+                {
+                  PRINTF(2)("!!There is no group called %s in this GUI.\n First best Widget will get the Infos assigned.\n Config-File will be updated in next Save\n", Buffer);
+                  groupWidget = widget;
+                }
+              else
+                PRINT(5)("Group %s located.\n", static_cast<Packer*>(groupWidget)->groupName);
+            }
+          // option-setting //
+          if(!strcmp(Buffer, "="))
+            {
+              char* under2space;
+              while(under2space = strchr(Variable, '_'))
+                {
+                  sprintf(under2space, " %s", under2space+1);
+                }
+
+              fscanf(this->CONFIG_FILE, "%s", Buffer);
+              varInfo.variableName = Variable;
+              varInfo.variableValue = Buffer;
+              groupWidget->walkThrough(this->readFileText, &varInfo, 0);
+              sprintf(Variable, "");
+            }
+          sprintf(Variable, "%s", Buffer);
+        }
       widget->walkThrough(widget->setOptions, 0);
     }
+    fclose(this->CONFIG_FILE);
 }
 
@@ -317,5 +318,5 @@
       PRINT(5)("Located Option %s.\n", widget->title);
       if(widget->optionType > GUI_NOTHING)
-	static_cast<Option*>(widget)->load(info->variableValue);
+        static_cast<Option*>(widget)->load(info->variableValue);
     }
 }
@@ -344,19 +345,19 @@
     {
       if(static_cast<Packer*>(widget)->getGroupName() &&
-	 !strcmp(groupName, static_cast<Packer*>(widget)->getGroupName()))
-	{
-	  return widget;
-	}
+         !strcmp(groupName, static_cast<Packer*>(widget)->getGroupName()))
+        {
+          return widget;
+        }
       else
-	{
-	  if((tmp = locateGroup(static_cast<Packer*>(widget)->down, groupName, depth+1)) != NULL)
-	    return tmp;
-	}
-    } 
-  
+        {
+          if((tmp = locateGroup(static_cast<Packer*>(widget)->down, groupName, depth+1)) != NULL)
+            return tmp;
+        }
+    }
+
   if(widget->next != NULL && depth != 0)
     {
       if((tmp = locateGroup(widget->next, groupName, depth)) != NULL)
-	return tmp;
+        return tmp;
     }
   return NULL;
Index: orxonox/trunk/src/lib/sound/sound_engine.cc
===================================================================
--- orxonox/trunk/src/lib/sound/sound_engine.cc	(revision 4829)
+++ orxonox/trunk/src/lib/sound/sound_engine.cc	(revision 4830)
@@ -378,5 +378,5 @@
 void SoundEngine::flushAllBuffers()
 {
-    tIterator<SoundBuffer>* bufferIterator = this->bufferList->getIterator();
+  tIterator<SoundBuffer>* bufferIterator = this->bufferList->getIterator();
   SoundBuffer* enumBuffer = bufferIterator->nextElement();
   while (enumBuffer)
@@ -389,4 +389,20 @@
 
 /**
+  * @brief SourceEngine::flushAllBuffers
+ */
+void SoundEngine::flushAllSources()
+{
+  tIterator<SoundSource>* Iterator = this->sourceList->getIterator();
+  SoundSource* enumSource = Iterator->nextElement();
+  while (enumSource)
+  {
+    delete enumSource;
+    enumSource = Iterator->nextElement();
+  }
+  delete Iterator;
+}
+
+
+/**
    \brief initializes Audio in general
 */
Index: orxonox/trunk/src/lib/sound/sound_engine.h
===================================================================
--- orxonox/trunk/src/lib/sound/sound_engine.h	(revision 4829)
+++ orxonox/trunk/src/lib/sound/sound_engine.h	(revision 4830)
@@ -91,4 +91,5 @@
   void flushUnusedBuffers();
   void flushAllBuffers();
+  void flushAllSources();
   bool initAudio();
 
Index: orxonox/trunk/src/lib/util/substring.cc
===================================================================
--- orxonox/trunk/src/lib/util/substring.cc	(revision 4829)
+++ orxonox/trunk/src/lib/util/substring.cc	(revision 4830)
@@ -29,14 +29,14 @@
 SubString::SubString( const char* string, char splitter)
 {
-  n = 0;
+  this->splittersCount = 0;
 
   assert( string != NULL);
 
-  for( int i = 0; i < strlen(string); i++) if( string[i] == splitter) n++;
+  for( int i = 0; i < strlen(string); i++) if( string[i] == splitter)
+      splittersCount++;
 
-  n += 1;
+  this->splittersCount += 1;
 
-  strings = new char*[n];
-
+  this->strings = new char*[this->splittersCount];
   assert (strings != NULL);
 
@@ -48,7 +48,7 @@
   while( end != NULL)
     {
-      assert( i < n);
+      assert( i < this->splittersCount);
       l = end - offset;
-      strings[i] = new char[l + 1];
+      this->strings[i] = new char[l + 1];
       assert( strings[i] != NULL);
       strncpy( strings[i], offset, l);
@@ -71,19 +71,10 @@
 SubString::~SubString()
 {
-  for( int i = 0; i < n; i++)
+  for( int i = 0; i < this->splittersCount; i++)
     {
-      delete strings[i];
+      delete this->strings[i];
     }
 
-  delete strings;
-}
-
-/**
-   \brief get the amount of substrings
-   \returns the amount of substrings
-*/
-int SubString::getCount()
-{
-  return n;
+  delete this->strings;
 }
 
@@ -95,5 +86,7 @@
 const char* SubString::getString( int i)
 {
-  if( i < n && i >= 0) return strings[i];
-  else return NULL;
+  if( i < this->splittersCount && i >= 0)
+    return this->strings[i];
+  else
+    return NULL;
 }
Index: orxonox/trunk/src/lib/util/substring.h
===================================================================
--- orxonox/trunk/src/lib/util/substring.h	(revision 4829)
+++ orxonox/trunk/src/lib/util/substring.h	(revision 4830)
@@ -14,10 +14,10 @@
   ~SubString();
 
-  int getCount();
+  inline int getCount() { return this->splittersCount; };
   const char* getString( int i);
 
  private:
-  char**     strings;         //!< strings produced from a single string splitted in multiple strings
-  int        n;               //!< how many splitted parts
+  char**     strings;                      //!< strings produced from a single string splitted in multiple strings
+  int        splittersCount;               //!< how many splitted parts
 };
 
Index: orxonox/trunk/src/orxonox.cc
===================================================================
--- orxonox/trunk/src/orxonox.cc	(revision 4829)
+++ orxonox/trunk/src/orxonox.cc	(revision 4830)
@@ -71,4 +71,6 @@
   this->argv = NULL;
 
+  this->configFileName = NULL;
+
 }
 
@@ -79,4 +81,5 @@
 {
   delete this->iniParser;
+  delete this->configFileName;
 
   delete GraphicsEngine::getInstance(); // deleting the Graphics
@@ -116,6 +119,7 @@
  * it's path and name into configfilename
 */
-const char* Orxonox::getConfigFile (int argc, char** argv)
-{
+const char* Orxonox::getConfigFile ()
+{
+  this->configFileName = new char[strlen(DEFAULT_CONFIG_FILE)];
   strcpy (this->configFileName, DEFAULT_CONFIG_FILE);
   this->iniParser = new IniParser(this->configFileName);
@@ -133,5 +137,5 @@
 
   // initialize the Config-file
-  this->getConfigFile(argc, argv);
+  this->getConfigFile();
 
 
@@ -351,5 +355,5 @@
 int startOrxonox(int argc, char** argv)
 {
-  // checking for existence of the configuration-files
+  // checking for existence of the configuration-files, or if the lock file is still used
   if (showGui ||
       !ResourceManager::isFile(DEFAULT_CONFIG_FILE) ||
Index: orxonox/trunk/src/orxonox.h
===================================================================
--- orxonox/trunk/src/orxonox.h	(revision 4829)
+++ orxonox/trunk/src/orxonox.h	(revision 4830)
@@ -41,5 +41,5 @@
   int initResources ();
 
-  const char* getConfigFile (int argc, char** argv);
+  const char* getConfigFile ();
 
  private:
@@ -47,5 +47,5 @@
 
   IniParser*        iniParser;               //!< Reference to the ini-parser used in orxonox
-  char              configFileName[256];     //!< Filename of the configuration-file.
+  char*             configFileName;          //!< Filename of the configuration-file.
   GameLoader*       gameLoader;              //!< The gameLoader
 
Index: orxonox/trunk/src/story_entities/world.cc
===================================================================
--- orxonox/trunk/src/story_entities/world.cc	(revision 4829)
+++ orxonox/trunk/src/story_entities/world.cc	(revision 4830)
@@ -186,6 +186,9 @@
 
   delete WorldInterface::getInstance();
-  delete this->nullParent;
+  delete NullParent::getInstance();
   delete this->entities;
+  State::setWorldEntityList(NULL);
+
+
   delete LightManager::getInstance();
   delete TrackManager::getInstance();
@@ -194,4 +197,5 @@
   TextEngine::getInstance()->flush();
   SoundEngine::getInstance()->flushAllBuffers();
+  SoundEngine::getInstance()->flushAllSources();
 
   delete AnimationPlayer::getInstance(); // this should be at the end of the unloading sequence.
@@ -203,4 +207,8 @@
 
   ResourceManager::getInstance()->unloadAllByPriority(RP_LEVEL);
+
+
+
+  crosshair=NULL;
 }
 
@@ -238,7 +246,4 @@
   LoadParam<World>(root, "path", this, &World::setPath)
     .describe("The Filename of this World (relative from the data-dir)");
-
-  if (!crosshair)
-    crosshair = new Crosshair();
 }
 
@@ -273,4 +278,7 @@
 
   GraphicsEngine::getInstance()->displayFPS(true);
+
+  if (!crosshair)
+    crosshair = new Crosshair();
 }
 
@@ -849,9 +857,10 @@
   glCallList (objectList);
 
-  ParticleEngine::getInstance()->draw(); //!< \todo should be dts like in the Trunk;
+  ParticleEngine::getInstance()->draw();
+
+  crosshair->draw();
 
   TextEngine::getInstance()->draw();
   LightManager::getInstance()->draw(); // must be at the end of the drawing procedure, otherwise Light cannot be handled as PNodes //
-  crosshair->draw();
 }
 
Index: orxonox/trunk/src/world_entities/weapons/crosshair.cc
===================================================================
--- orxonox/trunk/src/world_entities/weapons/crosshair.cc	(revision 4829)
+++ orxonox/trunk/src/world_entities/weapons/crosshair.cc	(revision 4830)
@@ -23,4 +23,5 @@
 #include "p_node.h"
 #include "state.h"
+#include "model.h"
 
 #include <iostream>
@@ -37,4 +38,27 @@
   this->setName("Crosshair");
 
+  this->material = NULL;
+  this->model = NULL;
+  this->rotation = 0;
+
+  this->material = new Material("Crosshair Material");
+  this->material->setDiffuseMap("maps/aim.png");
+
+  float size = 50;
+  this->model = new Model();
+  this->model->addVertex (-0.5*size, -0.5*size, 0);
+  this->model->addVertex (0.5*size, -0.5*size, 0);
+  this->model->addVertex (0.5*size, 0.5*size, 0);
+  this->model->addVertex (-0.5*size, 0.5*size, 0);
+
+  this->model->addVertexTexture(0,0);
+  this->model->addVertexTexture(1,0);
+  this->model->addVertexTexture(1,1);
+  this->model->addVertexTexture(0,1);
+
+  this->model->setMaterial(this->material);
+  this->model->addFace(4, VERTEX_TEXCOORD, 0,0, 1,1 ,2,2, 3,3);
+  this->model->finalize();
+
   EventHandler::getInstance()->subscribe(this, ES_GAME, EV_MOUSE_MOTION);
 
@@ -47,4 +71,6 @@
 Crosshair::~Crosshair ()
 {
+ // delete this->model;
+
   // delete what has to be deleted here
   EventHandler::getInstance()->unsubscribe(this);
@@ -81,5 +107,5 @@
 
 
-void Crosshair::draw() const
+void Crosshair::draw()
 {
   /*
@@ -118,16 +144,15 @@
   GraphicsEngine::storeMatrices();
 
-  float z;
-  glReadPixels ((int)position2D[0], GraphicsEngine::getInstance()->getResolutionY()-(int)position2D[1]-1, 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &z);
-
-
-  printf("%f %f %f\n", (int)position2D[0], (int)position2D[1], z);
+///  float z;
+//   glReadPixels ((int)position2D[0], GraphicsEngine::getInstance()->getResolutionY()-(int)position2D[1]-1, 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &z);
+
 
   //cout << z <<"  "<< scale << "  "  << bias<< endl;
+
 
   GLdouble objX, objY, objZ;
   gluUnProject(position2D[0],
                GraphicsEngine::getInstance()->getResolutionY()-position2D[1]-1,
-               .5,
+               .99,
                GraphicsEngine::modMat,
                GraphicsEngine::projMat,
@@ -137,9 +162,46 @@
                &objZ );
 
-  glBegin(GL_TRIANGLES);
-  glColor3f(1,0,0);
-  glVertex3f(objX, objY, objZ);
-  glVertex3f(objX, objY+1, objZ);
-  glVertex3f(objX, objY, objZ+1);
+  this->setAbsCoor(objX, objY, objZ);
+
+//   glBegin(GL_TRIANGLES);
+//   glColor3f(1,0,0);
+//   glVertex3f(objX, objY, objZ);
+//   glVertex3f(objX, objY+1, objZ);
+//   glVertex3f(objX, objY, objZ+1);
+//   glEnd();
+
+
+  GraphicsEngine::enter2DMode();
+  GLdouble pos[3];
+  gluProject(this->getAbsCoor().x,
+             this->getAbsCoor().y,
+             this->getAbsCoor().z,
+             GraphicsEngine::modMat,
+             GraphicsEngine::projMat,
+             GraphicsEngine::viewPort,
+             pos, pos+1, pos+2 );
+
+  printf("%d %d %d\n", (int)pos[0], (int)pos[1], (int)pos[2]);
+  this->rotation += 5;
+
+  glTranslatef(position2D[0], position2D[1], 0);
+  glRotatef(this->rotation, 0,0,1);
+  this->model->draw();
+  /*
+  glBegin(GL_QUADS);
+  {
+    glColor4f(1,0,0,1);
+    glVertex2f(position2D[0]-10, position2D[1]-10);
+    glVertex2f(position2D[0]+10, position2D[1]-10);
+    glVertex2f(position2D[0]+10, position2D[1]+10);
+    glVertex2f(position2D[0]-10, position2D[1]+10);
+
+    //     glVertex2f(pos[0]-10, pos[1]-10);
+    //     glVertex2f(pos[0]-10, pos[1]+10);
+    //     glVertex2f(pos[0]+10, pos[1]+10);
+    //     glVertex2f(pos[0]+10, pos[1]-10);
+  }
   glEnd();
-}
+  */
+  GraphicsEngine::leave2DMode();
+}
Index: orxonox/trunk/src/world_entities/weapons/crosshair.h
===================================================================
--- orxonox/trunk/src/world_entities/weapons/crosshair.h	(revision 4829)
+++ orxonox/trunk/src/world_entities/weapons/crosshair.h	(revision 4830)
@@ -9,12 +9,13 @@
 
 #include "event_listener.h"
-
+#include "p_node.h"
 #include "vector.h"
 
 // FORWARD DEFINITION
-
+class Model;
+class Material;
 
 //! A class that enables the
-class Crosshair : public EventListener {
+class Crosshair : public PNode, public EventListener {
 
  public:
@@ -25,14 +26,14 @@
   virtual void process(const Event &event);
 
-  /** @returns the current 3D-position of the Crosshair */
-  const Vector& getPosition() { return this->position; };
-
   void tick(float dt);
-  void draw() const;
+  void draw();
 
  private:
-   Vector           position;             //!< The current position of the Crosshair
    float            position2D[2];        //!< The 2D-position on the screen
 
+   Model*           model;                //!< A model for the crosshair representing the Aim
+   Material*        material;             //!< a material for the Aim.
+   float            rotation;             //!< a rotation of the aim.
+   float            size;                 //!< The Size of the Crosshair (in % of screen resolution 1 is fullscreen)
 };
 
Index: orxonox/trunk/src/world_entities/weapons/weapon.cc
===================================================================
--- orxonox/trunk/src/world_entities/weapons/weapon.cc	(revision 4829)
+++ orxonox/trunk/src/world_entities/weapons/weapon.cc	(revision 4830)
@@ -33,5 +33,4 @@
   this->setRelCoor(coordinate);
   this->setRelDir(direction);
-  this->worldEntities = State::getWorldEntityList();
 }
 
@@ -156,5 +155,5 @@
    can destroy the weapons of enemies or vice versa.
 */
-void Weapon::hit (WorldEntity* entity, Vector* position)
+void Weapon::hit (WorldEntity* entity, const Vector& position)
 {}
 
Index: orxonox/trunk/src/world_entities/weapons/weapon.h
===================================================================
--- orxonox/trunk/src/world_entities/weapons/weapon.h	(revision 4829)
+++ orxonox/trunk/src/world_entities/weapons/weapon.h	(revision 4830)
@@ -32,30 +32,35 @@
 class TiXmlElement;
 
+//! An enumerator defining actions a Weapon can take
+typedef enum {
+  WA_NONE          =    0,    //!< No Action taken
+  WA_SHOOT         =    1,    //!< emitting Shot
+  WA_CHARGE        =    2,    //!< charge action (one click before the shot)
+  WA_RELOAD        =    3,    //!< reload right after shoot is finished
+  WA_ACTIVATE      =    4,    //!< activate the GUN
+  WA_DEACTIVATE    =    5,    //!< deactivate the GUN
+  WA_SPECIAL1      =    6,    //!< Special Action taken
 
-// typedef enum {
-//   W_SHOOT,
-//   W_EMPTY,
-//   W_RELOAD,
-//   W_SPECIAL1,
-//   W_SPECIAL2,
-//   W_SPECIAL3
-// } WeaponSoundType;
-
+  WA_ACTION_COUNT  =    6     //!< This must match the count of enumerations (without W_NONE)
+} WeaponActions;
 
 //! An enumerator defining the States of a Weapon
 typedef enum {
-  W_NONE          =    0,    //!< No State at all (if set, there is something wrong, or the weapon is not yet availiable)
-  W_SHOOT         =    1,    //!< The State of the Shooting
-  W_RELOAD        =    2,    //!< The State of the Reloading
-  W_ACTIVATING    =    3,    //!< The State in which the weapon gets activated
-  W_DEACTIVATING  =    4,    //!< The State in which the weapon gets deactivated
-  W_INACTIVE      =    5,    //!< The State where the weapon is inactive (unable to shoot)
-  W_IDLE          =    6,    //!< The State where the weapon is idle
+  WS_NONE          =    0,    //!< No State at all (if set, there is something wrong, or the weapon is not yet availiable)
+  WS_SHOOTING      =    1,    //!< The State of the Shooting
+  WS_RELOADING     =    3,    //!< The State of the Reloading
+  WS_ACTIVATING    =    4,    //!< The State in which the weapon gets activated
+  WS_DEACTIVATING  =    5,    //!< The State in which the weapon gets deactivated
+  WS_INACTIVE      =    6,    //!< The State where the weapon is inactive (unable to shoot)
+  WS_IDLE          =    7,    //!< The State where the weapon is idle
 
-  W_STATES_COUNT  =    6     //!< This must match the count of the enumerations (without W_NONE)
+  WS_STATE_COUNT  =    7     //!< This must match the count of the enumerations (without W_NONE)
 } WeaponState;
 
 
 //! a weapon can be left or right sided
+/**
+ * @todo this will be reset with mirror X/Y/Z
+ */
 #define    W_LEFT        0
 #define    W_RIGHT       1
@@ -99,5 +104,5 @@
   /** @brief fires the weapon */
   virtual void fire() = 0;
-  virtual void hit (WorldEntity* weapon, Vector* loc);
+  virtual void hit (WorldEntity* weapon, const Vector& loc);
   virtual void destroy();
 
@@ -107,9 +112,16 @@
 
  protected:
-  tList<WorldEntity>*  worldEntities;
 
-  float                localTime;                 //<! this is the local time. important for shooting attributes like frequency
-  float                idleTime;                  //<! the time a weapon needs before it can shoot again. eg. shooting frequency or actication/deactivateion delay
-  float                slowDownFactor;            //<! if the shooting frequency is a linear function of time...
+  float                localTime;                        //<! this is the local time. important for shooting attributes like frequency
+  float                idleTime;                         //<! the time a weapon needs before it can shoot again. eg. shooting frequency or actication/deactivateion delay
+  float                slowDownFactor;                   //<! if the shooting frequency is a linear function of time...
+
+  ////////////
+  // PHASES //
+  ////////////
+  float                times[WS_STATE_COUNT];            //!< Times to stay in the different States @see WeaponState
+  SoundBuffer*         soundBuffers[WA_ACTION_COUNT];    //!< SoundBuffers for all actions @see WeaponAction
+
+
 
   SoundBuffer*         fireSound;
@@ -118,6 +130,6 @@
 
  private:
-  bool                 enabled;                    //<! states if the weapon is enabled or not
-  Projectile*          projectile;          //<! the projectile used for this weapon
+  bool                 enabled;                          //<! states if the weapon is enabled or not
+  Projectile*          projectile;                       //<! the projectile used for this weapon
   //WeaponSound sound;
 };
