Index: orxonox/trunk/src/defs/alincl.h
===================================================================
--- orxonox/trunk/src/defs/alincl.h	(revision 4958)
+++ orxonox/trunk/src/defs/alincl.h	(revision 4959)
@@ -2,5 +2,5 @@
   \file alincl.h
   \brief This file includes al Headers.
-  
+
   no Class is defined here, but the openAL Headers
 */
@@ -12,7 +12,9 @@
 #include <AL/al.h>
 #include <AL/alu.h>
+#include <AL/alc.h>
 #include <AL/alut.h>
 #else
 #include <OpenAL/al.h>
+#include <OpenAL/alc.h>
 #include <OpenAL/alu.h>
 #include <OpenAL/alut.h>
Index: orxonox/trunk/src/lib/sound/sound_engine.cc
===================================================================
--- orxonox/trunk/src/lib/sound/sound_engine.cc	(revision 4958)
+++ orxonox/trunk/src/lib/sound/sound_engine.cc	(revision 4959)
@@ -467,4 +467,10 @@
 }
 
+void SoundEngine::listDevices()
+{
+
+  printf("%s\n",(const char*)alcGetString(NULL, ALC_DEVICE_SPECIFIER));
+}
+
 /*
 void SoundEngine::PrintALCErrorString(ALenum err)
Index: orxonox/trunk/src/lib/sound/sound_engine.h
===================================================================
--- orxonox/trunk/src/lib/sound/sound_engine.h	(revision 4958)
+++ orxonox/trunk/src/lib/sound/sound_engine.h	(revision 4959)
@@ -1,6 +1,6 @@
 /*!
-    \file sound_engine.h
-  *  Definition of the SoundEngine singleton Class
-*/
+ * @file sound_engine.h
+ * Definition of the SoundEngine singleton Class
+ */
 
 #ifndef _SOUND_ENGINE_H
@@ -22,16 +22,16 @@
 class SoundBuffer : public BaseObject
 {
- public:
-  SoundBuffer(const char* fileName);
-  ~SoundBuffer();
+  public:
+    SoundBuffer(const char* fileName);
+    ~SoundBuffer();
 
-  /** @returns the ID of the buffer used in this SoundBuffer */
-  inline ALuint getID() const { return this->bufferID; }
+    /** @returns the ID of the buffer used in this SoundBuffer */
+    inline ALuint getID() const { return this->bufferID; }
 
- private:
-  ALuint        bufferID;             //!< The address of the Buffer.
+  private:
+    ALuint        bufferID;             //!< The address of the Buffer.
 
-  ALsizei       size;                 //!< The size of the Buffer.
-  ALboolean     loop;                 //!< loop information.
+    ALsizei       size;                 //!< The size of the Buffer.
+    ALboolean     loop;                 //!< loop information.
 };
 
@@ -39,29 +39,29 @@
 class SoundSource : public BaseObject
 {
- public:
-  SoundSource(const PNode* sourceNode = NULL, const SoundBuffer* buffer = NULL);
-  ~SoundSource();
+  public:
+    SoundSource(const PNode* sourceNode = NULL, const SoundBuffer* buffer = NULL);
+    ~SoundSource();
 
   // user interaction
-  void play();
-  void play(const SoundBuffer* buffer);
-  void stop();
-  void pause();
-  void rewind();
+    void play();
+    void play(const SoundBuffer* buffer);
+    void stop();
+    void pause();
+    void rewind();
 
   // development functions
-  /** @returns The ID of this Source */
-  inline ALuint getID() const { return this->sourceID; }
-  /** @returns the SoundBuffer of this Source */
-  inline const SoundBuffer* getBuffer() const { return this->buffer; }
-  /** @returns the SourceNode of this Source */
-  inline const PNode* getNode() const { return this->sourceNode;}
+    /** @returns The ID of this Source */
+    inline ALuint getID() const { return this->sourceID; }
+    /** @returns the SoundBuffer of this Source */
+    inline const SoundBuffer* getBuffer() const { return this->buffer; }
+    /** @returns the SourceNode of this Source */
+    inline const PNode* getNode() const { return this->sourceNode;}
 
-  void setRolloffFactor(ALfloat rolloffFactor);
+    void setRolloffFactor(ALfloat rolloffFactor);
 
- private:
-  ALuint                 sourceID;              //!< The ID of the Source
-  const SoundBuffer*     buffer;                //!< The buffer to play in this source.
-  const PNode*           sourceNode;            //!< The SourceNode represente the position/velocity... of this source.
+  private:
+    ALuint                 sourceID;              //!< The ID of the Source
+    const SoundBuffer*     buffer;                //!< The buffer to play in this source.
+    const PNode*           sourceNode;            //!< The SourceNode represente the position/velocity... of this source.
 };
 
@@ -71,41 +71,44 @@
 class SoundEngine : public BaseObject {
 
- public:
-  virtual ~SoundEngine();
-  /** @returns a Pointer to the only object of this Class */
-  inline static SoundEngine* getInstance() { if (!singletonRef) singletonRef = new SoundEngine();  return singletonRef; };
+  public:
+    virtual ~SoundEngine();
+    /** @returns a Pointer to the only object of this Class */
+    inline static SoundEngine* getInstance() { if (!singletonRef) singletonRef = new SoundEngine();  return singletonRef; };
 
-  SoundSource* createSource(const char* fileName, PNode* sourceNode = NULL);
+    SoundSource* createSource(const char* fileName, PNode* sourceNode = NULL);
 
-  void setListener(PNode* listener);
-  void setDopplerValues(ALfloat dopplerFactor, ALfloat dopplerVelocity);
+    void setListener(PNode* listener);
+    void setDopplerValues(ALfloat dopplerFactor, ALfloat dopplerVelocity);
 
 
-  void addBuffer(SoundBuffer* buffer);
-  void removeBuffer(SoundBuffer* buffer);
-  void addSource(SoundSource* source);
-  void removeSource(SoundSource* source);
+    void addBuffer(SoundBuffer* buffer);
+    void removeBuffer(SoundBuffer* buffer);
+    void addSource(SoundSource* source);
+    void removeSource(SoundSource* source);
 
-  void update();
+    void update();
 
   // administrative
-  void flushUnusedBuffers();
-  void flushAllBuffers();
-  void flushAllSources();
-  bool initAudio();
+    void flushUnusedBuffers();
+    void flushAllBuffers();
+    void flushAllSources();
+    bool initAudio();
 
   // error handling:
-  static void PrintALErrorString(ALenum err);
+    static void PrintALErrorString(ALenum err);
   //  static void PrintALCErrorString(ALenum err);
 
 
- private:
-  SoundEngine();
-  static SoundEngine*      singletonRef;             //!< Reference to this class
+  private:
+    SoundEngine();
+    void listDevices();
+
+  private:
+    static SoundEngine*      singletonRef;             //!< Reference to this class
 
 
-  PNode*                   listener;                 //!< The listener of the Scene
-  tList<SoundBuffer>*      bufferList;               //!< A list of buffers
-  tList<SoundSource>*      sourceList;               //!< A list for all the sources in the scene.
+    PNode*                   listener;                 //!< The listener of the Scene
+    tList<SoundBuffer>*      bufferList;               //!< A list of buffers
+    tList<SoundSource>*      sourceList;               //!< A list for all the sources in the scene.
 
 };
Index: orxonox/trunk/src/story_entities/world.cc
===================================================================
--- orxonox/trunk/src/story_entities/world.cc	(revision 4958)
+++ orxonox/trunk/src/story_entities/world.cc	(revision 4959)
@@ -917,5 +917,5 @@
 
       /* update tick the rest */
-      //TrackManager::getInstance()->tick(this->dtS);
+      TrackManager::getInstance()->tick(this->dtS);
       this->localCamera->tick(this->dtS);
       // tick the engines
Index: orxonox/trunk/src/world_entities/weapons/test_gun.cc
===================================================================
--- orxonox/trunk/src/world_entities/weapons/test_gun.cc	(revision 4958)
+++ orxonox/trunk/src/world_entities/weapons/test_gun.cc	(revision 4959)
@@ -164,7 +164,5 @@
   if (target != NULL)
   {
-    target->debugDraw();
-    Vector test = ((target->getAbsCoor() - this->getAbsCoor())*5);
-    pj->setVelocity(test/20.0);//this->getVelocity());
+    pj->setVelocity(this->getVelocity()+(target->getAbsCoor() - this->getAbsCoor())*.5);//this->getVelocity());
   }
   else
Index: orxonox/trunk/src/world_entities/weapons/test_gun.h
===================================================================
--- orxonox/trunk/src/world_entities/weapons/test_gun.h	(revision 4958)
+++ orxonox/trunk/src/world_entities/weapons/test_gun.h	(revision 4959)
@@ -26,4 +26,13 @@
 #include "weapon.h"
 
+
+//! 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
+
+
 class TestGun : public Weapon
   {
Index: orxonox/trunk/src/world_entities/weapons/weapon.cc
===================================================================
--- orxonox/trunk/src/world_entities/weapons/weapon.cc	(revision 4958)
+++ orxonox/trunk/src/world_entities/weapons/weapon.cc	(revision 4959)
@@ -56,4 +56,7 @@
     if (this->soundBuffers[i])
       ResourceManager::getInstance()->unload(this->soundBuffers[i]);
+
+  if (ClassList::exists(this->soundSource, CL_SOUND_SOURCE))
+    delete this->soundSource;
 }
 
Index: orxonox/trunk/src/world_entities/weapons/weapon.h
===================================================================
--- orxonox/trunk/src/world_entities/weapons/weapon.h	(revision 4958)
+++ orxonox/trunk/src/world_entities/weapons/weapon.h	(revision 4959)
@@ -1,17 +1,13 @@
 /*!
-    \file weapon.h
-  *  a weapon that a  can use
-
-
-    A weapon is characterized by:
-     o firing-rate: the initial firing rate of a weapon (1/s = Herz)
-     o slowdown-factor: this is a factor d: exp(-d*x), d is element of all positive R. it determines how fast the firing-rate will slow down. if no slowdown: d=0, the bigger d is, the faster the weapon will slow down!
-     o energy-consumption: this determines the energy that has to be used to produce this projectile = costs per projectile
-
-    Furthermore there are some other attributes, that will help to represent a firing
-    weapon in this world:
-     o sound file/ressource: this is a pointer to the sound-file/ressource. however it may be represented
-     o animations
-*/
+ * @file weapon.h
+ *
+ * Weapon is the mayor baseclass for all weapons. it is quite extensive, and expensive in use,
+ * because each weapon will know virutal functions for the WorldEntity's part, and also virtuals
+ * for Fireing/Reloading/...,
+ * quickly said: Weapon is a wrapper for weapons, that makes it easy to very quickly implement
+ * new Weapons, and with them make this game better, than any game before it, because still
+ * Weapons (GUNS) are the most important thing in life :?... no to be serious
+ * @see Weapon
+ */
 
 
@@ -56,11 +52,19 @@
 } 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
+//! an enumerator defining capabilities of a WeaponSlot
+typedef enum
+{
+  WTYPE_DIRECTIONAL   = 0x00000001,           //!< Weapon is directional/Slot is able to carry directional weapons
+  WTYPE_TURRET        = 0x00000002,           //!< Weapon is a turret/slot is able to carry turrets
+  WTYPE_ALLKINDS      = 0x0000000f,           //!< Weapon is all types/Slot is able to carry all kinds of weapons
+
+  WTYPE_FORWARD       = 0x00000010,           //!< Weapon fires forwards/Slot is able to carry weapons firing forwards
+  WTYPE_BACKWARD      = 0x00000020,           //!< Weapon fires backwards/Slot is able to carry weapons firing backwards
+  WTYPE_LEFT          = 0x00000040,           //!< Weapon fires to the left/Slot is able to carry weapons firing to the left
+  WTYPE_RIGHT         = 0x00000080,           //!< Weapon fires to the right/Slot is able to carry weapons firing to the right
+  WTYPE_ALLDIRS       = 0x000000f0,           //!< Weapon has no specific firing direction/Slot can fire into all directions
+
+  WTYPE_ALL           = 0x000000ff,           //!< Weapon has no limitations/Slot can handle all kinds of Weapon.
+} W_Capability;
 
 //! An abstract class, that describes weapons
Index: orxonox/trunk/src/world_entities/weapons/weapon_manager.cc
===================================================================
--- orxonox/trunk/src/world_entities/weapons/weapon_manager.cc	(revision 4958)
+++ orxonox/trunk/src/world_entities/weapons/weapon_manager.cc	(revision 4959)
@@ -73,5 +73,5 @@
   for (int i = 0; i < WM_MAX_SLOTS; i++)
   {
-    this->currentSlotConfig[i].capability = WM_SLOTC_ALL;
+    this->currentSlotConfig[i].capability = WTYPE_ALL;
     this->currentSlotConfig[i].currentWeapon = NULL;
     this->currentSlotConfig[i].nextWeapon = NULL;
Index: orxonox/trunk/src/world_entities/weapons/weapon_manager.h
===================================================================
--- orxonox/trunk/src/world_entities/weapons/weapon_manager.h	(revision 4958)
+++ orxonox/trunk/src/world_entities/weapons/weapon_manager.h	(revision 4959)
@@ -13,10 +13,8 @@
 #include "base_object.h"
 
-#include "p_node.h"
 #include "crosshair.h"
+#include "weapon.h"
 
 // FORWARD DECLARATION
-class PNode;
-class Weapon;
 template <class T> class tAnimation;
 
@@ -25,20 +23,4 @@
 #define    WM_MAX_CONFIGS          4              //!< The maximum number of predefined Configurations
 #define    WM_MAX_LOADED_WEAPONS   20             //!< The
-
-//! an enumerator defining capabilities of a WeaponSlot
-typedef enum
-{
-  WM_SLOTC_DIRECTIONAL   = 0x00000001,           //!< if the Slot is able to carry directional weapons
-  WM_SLOTC_TURRET        = 0x00000002,           //!< if the Slot is able to carry turrets
-  WM_SLOTC_ALLKINDS      = 0x0000000f,           //!< if the Slot is able to carry all kinds of weapons
-
-  WM_SLOTC_FORWARD       = 0x00000010,           //!< if the Slot is able to carry weapons firing forward
-  WM_SLOTC_BACKWARD      = 0x00000020,           //!< if the Slot is able to carry weapons firing backwards
-  WM_SLOTC_LEFT          = 0x00000040,           //!< if the Slot is able to carry weapons firing to the left
-  WM_SLOTC_RIGHT         = 0x00000080,           //!< if the Slot is able to carry weapons firing to the right
-  WM_SLOTC_ALLDIRS       = 0x000000f0,           //!< this slot can fire into all directions
-
-  WM_SLOTC_ALL           = 0x000000ff,           //!< everything allowed in this slot
-} WM_SlotCapability;
 
 //! an enumerator defining a Slot, where a Weapon can be stored inside.
