Index: /trunk/src/world_entities/creatures/fps_player.cc
===================================================================
--- /trunk/src/world_entities/creatures/fps_player.cc	(revision 10486)
+++ /trunk/src/world_entities/creatures/fps_player.cc	(revision 10487)
@@ -73,9 +73,9 @@
 FPSPlayer::FPSPlayer(const TiXmlElement* root)
 {
-  this->init();
-
   if (root != NULL)
     this->loadParams(root);
 
+    this->updateNode(0.001);
+    this->init();
 }
 
Index: /trunk/src/world_entities/npcs/mover.cc
===================================================================
--- /trunk/src/world_entities/npcs/mover.cc	(revision 10486)
+++ /trunk/src/world_entities/npcs/mover.cc	(revision 10487)
@@ -13,4 +13,6 @@
    co-programmer:
 */
+
+#include "sound/resource_sound_buffer.h"
 #include "util/loading/load_param.h"
 #include "util/loading/factory.h"
@@ -28,22 +30,36 @@
 Mover::Mover(const TiXmlElement* root)
 {
-  this->registerObject(this, Mover::_objectList);
-  this->toList(OM_GROUP_00);
-  
-  this->targetCoordinates = Vector(0, 0, 0);
-  this->originCoordinates = Vector(0, 87, -256);
-  this->actionRadius = 40.0;
-  this->actionTime = 1.0;
-
-  if (root != NULL)
-    this->loadParams(root);
-
-  this->updateNode(0.001);
-  this->originCoordinates = this->getAbsCoor();
-  this->state = Closed;
+    this->registerObject(this, Mover::_objectList);
+    this->toList(OM_COMMON);
+
+    this->targetCoordinates = Vector(0, 0, 0);
+    this->originCoordinates = Vector(0, 87, -256);
+    this->actionRadius = 40.0;
+    this->actionTime = 1.0;
+
+    if (root != NULL)
+        this->loadParams(root);
+
+    this->updateNode(0.001);
+    this->originCoordinates = this->getAbsCoor();
+    this->state = Closed;
+
+    this->soundSource_starting.setSourceNode(this);
+    this->soundSource_moving.setSourceNode(this);
+    this->soundSource_ending.setSourceNode(this);
+
+//    this->soundSource_starting.setRolloffFactor(0.0);
+//    this->soundSource_moving.setRolloffFactor(0.0);
+//    this->soundSource_ending.setRolloffFactor(0.0);
 }
 
 Mover::~Mover()
 {
+    if (this->soundSource_starting.isPlaying())
+        this->soundSource_starting.stop();
+    if (this->soundSource_moving.isPlaying())
+        this->soundSource_moving.stop();
+    if (this->soundSource_ending.isPlaying())
+        this->soundSource_ending.stop();
 }
 
@@ -54,14 +70,49 @@
 void Mover::loadParams(const TiXmlElement* root)
 {
-  WorldEntity::loadParams(root);
-
-  LoadParam(root, "rel-target-coor", this, Mover, setTargetCoordinates)
-      .describe("sets the relative target coordinates of the door");
-  LoadParam(root, "action-radius", this, Mover, setActionRadius)
-      .describe("sets the action radius of the door")
-      .defaultValues(40.0);
-  LoadParam(root, "action-time", this, Mover, setActionTime)
-      .describe("sets the action time of the door")
-      .defaultValues(1.0);
+    WorldEntity::loadParams(root);
+
+    LoadParam(root, "rel-target-coor", this, Mover, setTargetCoordinates)
+        .describe("sets the relative target coordinates of the door");
+    LoadParam(root, "action-radius", this, Mover, setActionRadius)
+        .describe("sets the action radius of the door")
+        .defaultValues(40.0);
+    LoadParam(root, "action-time", this, Mover, setActionTime)
+        .describe("sets the action time of the door")
+        .defaultValues(1.0);
+    LoadParam(root, "opening-sound", this, Mover, setOpeningSoundFile)
+        .describe("Sets the file of the opening sound source");
+    LoadParam(root, "opened-sound", this, Mover, setOpenedSoundFile)
+        .describe("Sets the file of the opened sound source");
+    LoadParam(root, "moving-sound", this, Mover, setMovingSoundFile)
+        .describe("Sets the file of the moving sound source");
+    LoadParam(root, "closing-sound", this, Mover, setClosingSoundFile)
+        .describe("Sets the file of the closing sound source");
+    LoadParam(root, "closed-sound", this, Mover, setClosedSoundFile)
+        .describe("Sets the file of the closed sound source");
+}
+
+void Mover::setOpeningSoundFile(const std::string& fileName)
+{
+    this->soundBuffer_opening = OrxSound::ResourceSoundBuffer(fileName);
+}
+
+void Mover::setOpenedSoundFile(const std::string& fileName)
+{
+    this->soundBuffer_opened = OrxSound::ResourceSoundBuffer(fileName);
+}
+
+void Mover::setMovingSoundFile(const std::string& fileName)
+{
+    this->soundBuffer_moving = OrxSound::ResourceSoundBuffer(fileName);
+}
+
+void Mover::setClosingSoundFile(const std::string& fileName)
+{
+    this->soundBuffer_closing = OrxSound::ResourceSoundBuffer(fileName);
+}
+
+void Mover::setClosedSoundFile(const std::string& fileName)
+{
+    this->soundBuffer_closed = OrxSound::ResourceSoundBuffer(fileName);
 }
 
@@ -76,4 +127,8 @@
         {
             this->state = Opening;
+            if (this->soundBuffer_opening.loaded())
+                this->soundSource_starting.play(this->soundBuffer_opening);
+            if (this->soundBuffer_moving.loaded())
+                this->soundSource_moving.play(this->soundBuffer_moving, 1.0, true);
         }
     }
@@ -84,4 +139,8 @@
             this->state = Open;
             this->setAbsCoor(this->originCoordinates + this->targetCoordinates);
+            if (this->soundBuffer_opened.loaded())
+                this->soundSource_ending.play(this->soundBuffer_opened);
+            if (this->soundBuffer_moving.loaded())
+                this->soundSource_moving.stop();
         }
     }
@@ -91,4 +150,8 @@
         {
             this->state = Closing;
+            if (this->soundBuffer_closing.loaded())
+                this->soundSource_starting.play(this->soundBuffer_closing);
+            if (this->soundBuffer_moving.loaded())
+                this->soundSource_moving.play(this->soundBuffer_moving, 1.0, true);
         }
     }
@@ -99,4 +162,8 @@
             this->state = Closed;
             this->setAbsCoor(this->originCoordinates);
+            if (this->soundBuffer_closed.loaded())
+                this->soundSource_ending.play(this->soundBuffer_closed);
+            if (this->soundBuffer_moving.loaded())
+                this->soundSource_moving.stop();
         }
         if (this->checkPlayerInActionRadius())
@@ -145,38 +212,33 @@
 bool Mover::checkPlayerInActionRadius()
 {
-
-  WorldEntity* entity;
-  Vector vDistance;
-  float powerDistance;
-
-  for (ObjectList<Playable>::const_iterator it = Playable::objectList().begin();
-       it != Playable::objectList().end();
-       ++it)
-  // for all players
-  {
-    entity = (*it);
-
-    vDistance = this->originCoordinates - entity->getAbsCoor();
-    powerDistance = vDistance.x * vDistance.x + vDistance.z * vDistance.z;
-
-    if( powerDistance < (this->actionRadius * this->actionRadius))
-      return true;
-  }
-
-
-
-  for (ObjectList<GenericNPC>::const_iterator it = GenericNPC::objectList().begin();
-       it != GenericNPC::objectList().end();
-       ++it)
-  {
-    entity = (*it);
-
-    vDistance = this->originCoordinates - entity->getAbsCoor();
-    powerDistance = vDistance.x * vDistance.x + vDistance.z * vDistance.z;
-
-    if( powerDistance < (this->actionRadius * this->actionRadius))
-      return true;
-  }
-
-  return false;
-}
+    WorldEntity* entity;
+    float distance;
+
+    for (ObjectList<Playable>::const_iterator it = Playable::objectList().begin();
+        it != Playable::objectList().end();
+        ++it)
+    // for all players
+    {
+        entity = (*it);
+        distance = (this->originCoordinates - entity->getAbsCoor()).len();
+        if (distance < this->actionRadius)
+        {
+            this->soundSource_starting.setSourceNode(entity);   // bad hack!
+            this->soundSource_moving.setSourceNode(entity);     // TODO: make the sound louder without
+            this->soundSource_ending.setSourceNode(entity);     // attaching him to the player
+            return true;
+        }
+    }
+
+    for (ObjectList<GenericNPC>::const_iterator it = GenericNPC::objectList().begin();
+        it != GenericNPC::objectList().end();
+        ++it)
+    {
+        entity = (*it);
+        distance = (this->originCoordinates - entity->getAbsCoor()).len();
+        if (distance < this->actionRadius)
+            return true;
+    }
+
+    return false;
+}
Index: /trunk/src/world_entities/npcs/mover.h
===================================================================
--- /trunk/src/world_entities/npcs/mover.h	(revision 10486)
+++ /trunk/src/world_entities/npcs/mover.h	(revision 10487)
@@ -11,39 +11,55 @@
 #include "world_entity.h"
 
+#include "sound_buffer.h"
+#include "sound_source.h"
+
 //! A Class to handle a Mover
 class Mover : public WorldEntity
 {
-  ObjectListDeclaration(Mover);
-  public:
-    typedef enum MoverState {
-      Closed        = 0,
-      Opening       = 1,
-      Open          = 2,
-      Closing       = 3,
-      Locked        = 4
-    };
+    ObjectListDeclaration(Mover);
+    public:
+        typedef enum MoverState {
+            Closed        = 0,
+            Opening       = 1,
+            Open          = 2,
+            Closing       = 3,
+            Locked        = 4
+        };
 
-    Mover(const TiXmlElement* root = NULL);
-    virtual ~Mover();
+        Mover(const TiXmlElement* root = NULL);
+        virtual ~Mover();
 
-    virtual void loadParams(const TiXmlElement* root);
+        virtual void loadParams(const TiXmlElement* root);
 
-    void setTargetCoordinates(float x, float y, float z) { this->targetCoordinates = Vector(x,y,z); }
-    void setActionRadius(float radius) { this->actionRadius = radius; }
-    void setActionTime(float time) { this->actionTime = time; }
+        void setTargetCoordinates(float x, float y, float z) { this->targetCoordinates = Vector(x,y,z); }
+        void setActionRadius(float radius) { this->actionRadius = radius; }
+        void setActionTime(float time) { this->actionTime = time; }
+        void setOpeningSoundFile(const std::string& fileName);
+        void setOpenedSoundFile(const std::string& fileName);
+        void setMovingSoundFile(const std::string& fileName);
+        void setClosingSoundFile(const std::string& fileName);
+        void setClosedSoundFile(const std::string& fileName);
 
-    virtual void tick(float dt);
+        virtual void tick(float dt);
 
-  private:
-    bool checkOpen(float dt);
-    bool checkClosed(float dt);
-    bool checkPlayerInActionRadius();
+    private:
+        bool checkOpen(float dt);
+        bool checkClosed(float dt);
+        bool checkPlayerInActionRadius();
+    
+        OrxSound::SoundSource       soundSource_starting;
+        OrxSound::SoundSource       soundSource_moving;
+        OrxSound::SoundSource       soundSource_ending;
+        OrxSound::SoundBuffer       soundBuffer_opening;
+        OrxSound::SoundBuffer       soundBuffer_opened;
+        OrxSound::SoundBuffer       soundBuffer_moving;
+        OrxSound::SoundBuffer       soundBuffer_closing;
+        OrxSound::SoundBuffer       soundBuffer_closed;
 
-  private:
-    Vector              targetCoordinates;          //!< the target coordinates
-    Vector              originCoordinates;          //!< the origin coordinates
-    float               actionRadius;               //!< the action-radius
-    float               actionTime;                 //!< the action-time
-    int			state;                      //!< the state of the mover
+        Vector                      targetCoordinates;          //!< the target coordinates
+        Vector                      originCoordinates;          //!< the origin coordinates
+        float                       actionRadius;               //!< the action-radius
+        float                       actionTime;                 //!< the action-time
+        int                         state;                      //!< the state of the mover
 };
 
