Index: branches/new_class_id/src/lib/lang/base_object.cc
===================================================================
--- branches/new_class_id/src/lib/lang/base_object.cc	(revision 9804)
+++ branches/new_class_id/src/lib/lang/base_object.cc	(revision 9805)
@@ -45,4 +45,5 @@
   for (it = this->_classes.begin(); it != this->_classes.end(); ++it)
   {
+    PRINTF(5)("DELETING OBJECT %s::%s FROM %s\n", this->getClassCName(), getCName(), (*it)._objectList->name().c_str());
     (*it)._objectList->unregisterObject((*it)._iterator);
     delete (*it)._iterator;
Index: branches/new_class_id/src/lib/lang/object_list.cc
===================================================================
--- branches/new_class_id/src/lib/lang/object_list.cc	(revision 9804)
+++ branches/new_class_id/src/lib/lang/object_list.cc	(revision 9805)
@@ -272,5 +272,5 @@
          ++it)
     {
-      printf("   + %s::%s\n", (*it)->getClassCName(), (*it)->getCName());
+      printf("   + %s::%s (%p)\n", (*it)->getClassCName(), (*it)->getCName(), (*it));
     }
   }
Index: branches/new_class_id/src/lib/shell/some_shell_commands.cc
===================================================================
--- branches/new_class_id/src/lib/shell/some_shell_commands.cc	(revision 9804)
+++ branches/new_class_id/src/lib/shell/some_shell_commands.cc	(revision 9805)
@@ -67,2 +67,4 @@
     ->setAlias("orxoquit");
 
+#include "object_list.h"
+SHELL_COMMAND_STATIC(debugAll, ObjectListBase, &ObjectListBase::debugAll);
Index: branches/new_class_id/src/lib/sound/sound_buffer.cc
===================================================================
--- branches/new_class_id/src/lib/sound/sound_buffer.cc	(revision 9804)
+++ branches/new_class_id/src/lib/sound/sound_buffer.cc	(revision 9805)
@@ -20,12 +20,10 @@
 namespace OrxSound
 {
-  ObjectListDefinition(SoundBuffer);
   //////////////////
   /* SOUND-BUFFER */
   //////////////////
   SoundBuffer::SoundBuffer()
-  : data(new SoundBufferData)
+      : data(new SoundBufferData)
   {
-    this->registerObject(this, SoundBuffer::_objectList);
   }
   /**
@@ -34,10 +32,15 @@
    */
   SoundBuffer::SoundBuffer(const std::string& fileName)
-  : data(new SoundBufferData)
+      : data(new SoundBufferData)
   {
-    this->registerObject(this, SoundBuffer::_objectList);
-    this->setName(fileName);
-
     this->load(fileName);
   }
+
+  SoundBuffer::SoundBuffer(const SoundBuffer& buffer)
+      : data(buffer.data)
+  {  }
+
+  SoundBuffer::SoundBuffer(const SoundBufferData::Pointer& dataPointer)
+      : data(dataPointer)
+  {  };
 }
Index: branches/new_class_id/src/lib/sound/sound_buffer.h
===================================================================
--- branches/new_class_id/src/lib/sound/sound_buffer.h	(revision 9804)
+++ branches/new_class_id/src/lib/sound/sound_buffer.h	(revision 9805)
@@ -7,7 +7,4 @@
 #define _SOUND_BUFFER_H
 
-#include "base_object.h"
-#include "alincl.h"
-
 #include "sound_buffer_data.h"
 
@@ -15,12 +12,13 @@
 {
   //! A class that represents a datastructure to play Sounds.
-  class SoundBuffer : public BaseObject
+  class SoundBuffer
   {
-    ObjectListDeclaration(SoundBuffer);
   public:
     SoundBuffer();
-    SoundBuffer(const SoundBuffer& buffer) { this->data = buffer.data; }
-    SoundBuffer(const SoundBufferData::Pointer& dataPointer) { this->data = dataPointer; };
+    SoundBuffer(const SoundBuffer& buffer);
+    SoundBuffer(const SoundBufferData::Pointer& dataPointer);
     SoundBuffer(const std::string& fileName);
+
+    bool operator==(const SoundBuffer& buffer) const {return this->data == buffer.data; };
 
     /** @see SoundBufferData::load */
@@ -33,4 +31,5 @@
     /** @returns the ID of the buffer used in this SoundBuffer */
     inline ALuint getID() const { return this->data->getID(); }
+    inline bool loaded() const { return this->data->loaded(); }
 
     /** @returns the DataPointer */
@@ -38,6 +37,7 @@
     /** @param dataPointer the data to acquire @brief Buffer shall acquire dataPointers data */
     void acquireData(const SoundBufferData::Pointer& dataPointer)  { data = dataPointer; };
+
   private:
-    SoundBufferData::Pointer    data;
+    SoundBufferData::Pointer    data;                //!< Pointer to the Stored Data
   };
 }
Index: branches/new_class_id/src/lib/sound/sound_buffer_data.cc
===================================================================
--- branches/new_class_id/src/lib/sound/sound_buffer_data.cc	(revision 9804)
+++ branches/new_class_id/src/lib/sound/sound_buffer_data.cc	(revision 9805)
@@ -50,6 +50,5 @@
     this->size = 0;
     this->loop = AL_FALSE;
-
-
+    this->bLoaded = false;
   }
 
@@ -112,5 +111,8 @@
     SDL_FreeWAV(wavBuffer);
     if (SoundEngine::checkError("Could not load Wave file", __LINE__))
+    {
+      this->bLoaded = true;
       return true;
+    }
     else
       return false;
@@ -160,6 +162,6 @@
       return false;
 
+    this->bLoaded = true;
     return true ;
-
   }
 
Index: branches/new_class_id/src/lib/sound/sound_buffer_data.h
===================================================================
--- branches/new_class_id/src/lib/sound/sound_buffer_data.h	(revision 9804)
+++ branches/new_class_id/src/lib/sound/sound_buffer_data.h	(revision 9805)
@@ -33,4 +33,5 @@
     /** @returns the ID of the buffer used in this SoundBuffer */
     inline ALuint getID() const { return this->bufferID; }
+    inline bool loaded() const { return bLoaded; };
 
   private:
@@ -42,4 +43,5 @@
     ALsizei       size;                 //!< The size of the Buffer.
     ALboolean     loop;                 //!< loop information.
+    bool          bLoaded;               //!< If the Sound was loaded this is true.
   };
 }
Index: branches/new_class_id/src/lib/sound/sound_engine.cc
===================================================================
--- branches/new_class_id/src/lib/sound/sound_engine.cc	(revision 9804)
+++ branches/new_class_id/src/lib/sound/sound_engine.cc	(revision 9805)
@@ -26,4 +26,5 @@
 #include "util/preferences.h"
 #include "globals.h"
+#include "resource_sound_buffer.h"
 
 namespace OrxSound
@@ -119,9 +120,9 @@
   SoundSource* SoundEngine::createSource(const std::string& fileName, PNode* sourceNode)
   {
-    SoundBuffer* buffer = NULL;
+    SoundBuffer buffer;
     if (!fileName.empty())
     {
-      buffer= (SoundBuffer*)ResourceManager::getInstance()->load(fileName, WAV, RP_LEVEL);
-      if (buffer == NULL)
+      buffer = ResourceSoundBuffer(fileName);
+      if (!buffer.loaded())
         PRINTF(2)("Wav-Sound %s could not be loaded onto new Source\n", fileName.c_str());
     }
@@ -215,5 +216,5 @@
         if(play == AL_PLAYING)
         {
-	  if (likely((*sourceIT)->getNode() != NULL))
+          if (likely((*sourceIT)->getNode() != NULL))
           {
             alSource3f((*sourceIT)->getID(), AL_POSITION,
Index: branches/new_class_id/src/lib/sound/sound_source.cc
===================================================================
--- branches/new_class_id/src/lib/sound/sound_source.cc	(revision 9804)
+++ branches/new_class_id/src/lib/sound/sound_source.cc	(revision 9805)
@@ -19,5 +19,4 @@
 #include "sound_engine.h"
 
-#include "alincl.h"
 #include "compiler.h"
 #include "debug.h"
@@ -29,5 +28,5 @@
   * @brief creates a SoundSource at position sourceNode with the SoundBuffer buffer
   */
-  SoundSource::SoundSource(const PNode* sourceNode, const SoundBuffer* buffer)
+  SoundSource::SoundSource(const PNode* sourceNode, const SoundBuffer& buffer)
   {
     this->registerObject(this, SoundSource::_objectList);
@@ -120,10 +119,10 @@
   void SoundSource::play()
   {
-    if (this->buffer && this->retrieveSource())
+    if (this->retrieveSource())
     {
       if (this->bPlay)
         alSourceStop(this->sourceID);
 
-      alSourcei (this->sourceID, AL_BUFFER, this->buffer->getID());
+      alSourcei (this->sourceID, AL_BUFFER, this->buffer.getID());
       alSourcei (this->sourceID, AL_LOOPING,  AL_FALSE);
       alSourcef (this->sourceID, AL_GAIN, 1);
@@ -141,5 +140,5 @@
   * @param buffer the buffer to play back on this Source
   */
-  void SoundSource::play(const SoundBuffer* buffer)
+  void SoundSource::play(const SoundBuffer& buffer)
   {
     if (!this->retrieveSource())
@@ -150,5 +149,5 @@
 
     alSourceStop(this->sourceID);
-    alSourcei (this->sourceID, AL_BUFFER, buffer->getID());
+    alSourcei (this->sourceID, AL_BUFFER, buffer.getID());
     alSourcei (this->sourceID, AL_LOOPING,  AL_FALSE);
     alSourcef (this->sourceID, AL_GAIN, 1);
@@ -156,6 +155,6 @@
     alSourcePlay(this->sourceID);
 
-    if (unlikely(this->buffer != NULL))
-      alSourcei (this->sourceID, AL_BUFFER, this->buffer->getID());
+    if (unlikely(this->buffer.getID() != 0))
+      alSourcei (this->sourceID, AL_BUFFER, this->buffer.getID());
     this->bPlay = true;
 
@@ -170,5 +169,5 @@
    * @param gain the gain of the sound buffer
   */
-  void SoundSource::play(const SoundBuffer* buffer, float gain)
+  void SoundSource::play(const SoundBuffer& buffer, float gain)
   {
     if (!this->retrieveSource())
@@ -179,5 +178,5 @@
 
     alSourceStop(this->sourceID);
-    alSourcei (this->sourceID, AL_BUFFER, buffer->getID());
+    alSourcei (this->sourceID, AL_BUFFER, buffer.getID());
     alSourcei (this->sourceID, AL_LOOPING,  AL_FALSE);
     alSourcef (this->sourceID, AL_GAIN, gain);
@@ -185,6 +184,6 @@
     alSourcePlay(this->sourceID);
 
-    if (unlikely(this->buffer != NULL))
-      alSourcei (this->sourceID, AL_BUFFER, this->buffer->getID());
+    if (unlikely(this->buffer.getID() != 0))
+      alSourcei (this->sourceID, AL_BUFFER, this->buffer.getID());
     this->bPlay = true;
 
@@ -199,5 +198,5 @@
    * @param loop if true, sound gets looped
    */
-  void SoundSource::play(const SoundBuffer* buffer, float gain, bool loop)
+  void SoundSource::play(const SoundBuffer& buffer, float gain, bool loop)
   {
     if (!this->retrieveSource())
@@ -208,5 +207,5 @@
 
     alSourceStop(this->sourceID);
-    alSourcei (this->sourceID, AL_BUFFER, buffer->getID());
+    alSourcei (this->sourceID, AL_BUFFER, buffer.getID());
 
     if (loop)
@@ -219,6 +218,6 @@
     alSourcePlay(this->sourceID);
 
-    if (unlikely(this->buffer != NULL))
-      alSourcei (this->sourceID, AL_BUFFER, this->buffer->getID());
+    if (unlikely(this->buffer.getID() != 0))
+      alSourcei (this->sourceID, AL_BUFFER, this->buffer.getID());
     this->bPlay = true;
 
@@ -232,5 +231,5 @@
    * @param gain the new gain value
    */
-  void SoundSource::gain(const SoundBuffer* buffer, float gain)
+  void SoundSource::gain(const SoundBuffer& buffer, float gain)
   {
     // alSourcei (this->sourceID, AL_BUFFER, buffer->getID());
@@ -347,5 +346,5 @@
   * @param duration time perios to fade in
   */
-  void SoundSource::fadein(const SoundBuffer* buffer, ALfloat duration)
+  void SoundSource::fadein(const SoundBuffer& buffer, ALfloat duration)
   {
     //if (this->buffer && this->retrieveSource())
Index: branches/new_class_id/src/lib/sound/sound_source.h
===================================================================
--- branches/new_class_id/src/lib/sound/sound_source.h	(revision 9804)
+++ branches/new_class_id/src/lib/sound/sound_source.h	(revision 9805)
@@ -8,4 +8,5 @@
 
 #include "base_object.h"
+#include "sound_buffer.h"
 #include "alincl.h"
 
@@ -14,5 +15,4 @@
 namespace OrxSound
 {
-  class SoundBuffer;
   //! A class that represents a SoundSource
   class SoundSource : public BaseObject
@@ -20,5 +20,5 @@
     ObjectListDeclaration(SoundSource);
   public:
-    SoundSource(const PNode* sourceNode = NULL, const SoundBuffer* buffer = NULL);
+    SoundSource(const PNode* sourceNode = NULL, const SoundBuffer& buffer = SoundBuffer());
     SoundSource(const SoundSource& source);
     SoundSource& operator=(const SoundSource& source);
@@ -29,14 +29,14 @@
     // user interaction
     void play();
-    void play(const SoundBuffer* buffer);
-    void play(const SoundBuffer* buffer, float gain);
-    void play(const SoundBuffer* buffer, float gain, bool loop);
+    void play(const SoundBuffer& buffer);
+    void play(const SoundBuffer& buffer, float gain);
+    void play(const SoundBuffer& buffer, float gain, bool loop);
 
-    void gain(const SoundBuffer* buffer, float gain);
+    void gain(const SoundBuffer& buffer, float gain);
 
     void stop();
     void pause();
     void rewind();
-    void fadein(const SoundBuffer* buffer, ALfloat duration);
+    void fadein(const SoundBuffer& buffer, ALfloat duration);
 
     // development functions
@@ -47,5 +47,5 @@
     void setSourceNode(const PNode* sourceNode);
     /** @returns the SoundBuffer of this Source */
-    inline const SoundBuffer* getBuffer() const { return this->buffer; };
+    inline const SoundBuffer& getBuffer() const { return this->buffer; };
     /** @returns the SourceNode of this Source */
     inline const PNode* getNode() const { return this->sourceNode; };
@@ -66,5 +66,5 @@
     bool                   resident;    //!< If the alSource should be resident (if true, the alSource will be returned on deletion).
     ALuint                 sourceID;    //!< The ID of the Source
-    const SoundBuffer*     buffer;      //!< The buffer to play in this source.
+    SoundBuffer            buffer;      //!< The buffer to play in this source.
     const PNode*           sourceNode;  //!< The SourceNode representing the position/velocity... of this source.
   };
Index: branches/new_class_id/src/lib/util/loading/resource_manager.cc
===================================================================
--- branches/new_class_id/src/lib/util/loading/resource_manager.cc	(revision 9804)
+++ branches/new_class_id/src/lib/util/loading/resource_manager.cc	(revision 9805)
@@ -442,5 +442,5 @@
     case WAV:
       if(File(fullName).isFile())
-        tmpResource->pointer = new OrxSound::SoundBuffer(fullName);
+//        tmpResource->pointer = new OrxSound::SoundBuffer(fullName);
       break;
     case OGG:
Index: branches/new_class_id/src/world_entities/effects/lightning_bolt.cc
===================================================================
--- branches/new_class_id/src/world_entities/effects/lightning_bolt.cc	(revision 9804)
+++ branches/new_class_id/src/world_entities/effects/lightning_bolt.cc	(revision 9805)
@@ -20,5 +20,5 @@
 #include "material.h"
 
-#include "util/loading/resource_manager.h"
+#include "sound/resource_sound_buffer.h"
 
 
@@ -56,13 +56,7 @@
   this->seedTime = 4.0f;
 
-  this->soundSource = NULL;
-  this->thunderBuffer = NULL;
-
   this->soundSource.setSourceNode(this);
 
-  //load sound
-  if (this->thunderBuffer != NULL)
-    ResourceManager::getInstance()->unload(this->thunderBuffer);
-  this->thunderBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/atmosphere/thunder.wav", WAV);
+  this->thunderBuffer = OrxSound::ResourceSoundBuffer("sound/atmosphere/thunder.wav");
 }
 
Index: branches/new_class_id/src/world_entities/effects/lightning_bolt.h
===================================================================
--- branches/new_class_id/src/world_entities/effects/lightning_bolt.h	(revision 9804)
+++ branches/new_class_id/src/world_entities/effects/lightning_bolt.h	(revision 9805)
@@ -52,5 +52,5 @@
 
     OrxSound::SoundSource    soundSource;
-    OrxSound::SoundBuffer*   thunderBuffer;
+    OrxSound::SoundBuffer    thunderBuffer;
 };
 
Index: branches/new_class_id/src/world_entities/power_ups/power_up.cc
===================================================================
--- branches/new_class_id/src/world_entities/power_ups/power_up.cc	(revision 9804)
+++ branches/new_class_id/src/world_entities/power_ups/power_up.cc	(revision 9805)
@@ -21,5 +21,5 @@
 #include "primitive_model.h"
 
-#include "util/loading/resource_manager.h"
+#include "sound/resource_sound_buffer.h"
 #include "util/loading/load_param.h"
 
@@ -47,6 +47,4 @@
 
   this->soundSource.setSourceNode(this);
-  this->pickupBuffer = NULL;
-  this->respawnBuffer = NULL;
 
   this->collider = NULL;
@@ -56,8 +54,4 @@
 {
   delete this->sphereMaterial;
-  if (this->pickupBuffer != NULL)
-    ResourceManager::getInstance()->unload(this->pickupBuffer);
-  if (this->respawnBuffer != NULL)
-    ResourceManager::getInstance()->unload(this->respawnBuffer);
 }
 
@@ -79,42 +73,16 @@
 void PowerUp::loadPickupSound(const std::string& pickupSound)
 {
-  if (this->pickupBuffer != NULL)
-    ResourceManager::getInstance()->unload(this->pickupBuffer);
-
-  else if (!pickupSound.empty())
-  {
-    this->pickupBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load(pickupSound, WAV);
-    if (this->pickupBuffer != NULL)
-    {
-      PRINTF(4)("Loaded sound %s to Pickup: %s.\n", pickupSound.c_str(), this->getCName());
-    }
-    else
-    {
-      PRINTF(2)("Failed to load sound %s to pickup %s.\n.", pickupSound.c_str(), this->getCName());
-    }
-  }
+  if (!pickupSound.empty())
+    this->pickupBuffer = OrxSound::ResourceSoundBuffer(pickupSound);
   else
-    this->pickupBuffer = NULL;
+    this->pickupBuffer = OrxSound::SoundBuffer();
 }
 
 void PowerUp::loadRespawnSound(const std::string& respawnSound)
 {
-  if (this->respawnBuffer != NULL)
-    ResourceManager::getInstance()->unload(this->respawnBuffer);
-
-  else if (!respawnSound.empty())
-  {
-    this->respawnBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load(respawnSound, WAV);
-    if (this->respawnBuffer != NULL)
-    {
-      PRINTF(4)("Loaded sound %s to Pickup: %s.\n", respawnSound.c_str(), this->getCName());
-    }
-    else
-    {
-      PRINTF(2)("Failed to load sound %s to respawn %s.\n.", respawnSound.c_str(), this->getCName());
-    }
-  }
+  if (!respawnSound.empty())
+    this->respawnBuffer = OrxSound::ResourceSoundBuffer(respawnSound);
   else
-    this->respawnBuffer = NULL;
+    this->respawnBuffer = OrxSound::SoundBuffer();
 }
 
@@ -127,5 +95,5 @@
     if(dynamic_cast<Extendable*>(entity)->pickup(this))
     {
-      if(pickupBuffer != NULL)
+      if(pickupBuffer.loaded())
         this->soundSource.play(this->pickupBuffer);
 
@@ -156,5 +124,5 @@
       this->toList(OM_COMMON);
       this->collider = NULL;
-      if (likely(this->respawnBuffer != NULL))
+      if (likely(this->respawnBuffer.loaded()))
         this->soundSource.play(this->respawnBuffer);
 
Index: branches/new_class_id/src/world_entities/power_ups/power_up.h
===================================================================
--- branches/new_class_id/src/world_entities/power_ups/power_up.h	(revision 9804)
+++ branches/new_class_id/src/world_entities/power_ups/power_up.h	(revision 9805)
@@ -44,6 +44,6 @@
 private:
   OrxSound::SoundSource  soundSource;
-  OrxSound::SoundBuffer* pickupBuffer;
-  OrxSound::SoundBuffer* respawnBuffer;
+  OrxSound::SoundBuffer  pickupBuffer;
+  OrxSound::SoundBuffer  respawnBuffer;
   Material*              sphereMaterial;
   PowerUpRespawn         respawnType;
Index: branches/new_class_id/src/world_entities/projectiles/projectile.cc
===================================================================
--- branches/new_class_id/src/world_entities/projectiles/projectile.cc	(revision 9804)
+++ branches/new_class_id/src/world_entities/projectiles/projectile.cc	(revision 9805)
@@ -22,5 +22,5 @@
 #include "world_entities/weapons/weapon.h"
 #include "model.h"
-#include "util/loading/resource_manager.h"
+#include "sound/resource_sound_buffer.h"
 
 #include "debug.h"
@@ -44,7 +44,4 @@
   this->setDamage(1.0f); // default damage of a projectile set to 100.0 damage points
 
-  this->explosionBuffer = NULL;
-  this->engineBuffer = NULL;
-
   //this->addNodeFlags(PNODE_PROHIBIT_DELETE_WITH_PARENT);
 }
@@ -56,8 +53,4 @@
 Projectile::~Projectile ()
 {
-  if (this->explosionBuffer != NULL)
-    ResourceManager::getInstance()->unload(this->explosionBuffer);
-  if (this->engineBuffer != NULL)
-    ResourceManager::getInstance()->unload(this->engineBuffer);
   /*
      do not delete the test projectModel, since it is pnode
@@ -70,21 +63,8 @@
 void Projectile::loadExplosionSound(const std::string& explosionSound)
 {
-  if (this->explosionBuffer != NULL)
-    ResourceManager::getInstance()->unload(this->explosionBuffer);
-
-  else if (!explosionSound.empty())
-  {
-    this->explosionBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load(explosionSound, WAV);
-    if (this->explosionBuffer != NULL)
-    {
-      PRINTF(4)("Loaded sound %s to Pickup: %s.\n", explosionSound.c_str(), this->getCName());
-    }
-    else
-    {
-      PRINTF(2)("Failed to load sound %s to explosion %s.\n.", explosionSound.c_str(), this->getCName());
-    }
-  }
+  if (!explosionSound.empty())
+    this->explosionBuffer = OrxSound::ResourceSoundBuffer(explosionSound);
   else
-    this->explosionBuffer = NULL;
+    this->explosionBuffer = OrxSound::SoundBuffer();
 }
 
@@ -92,21 +72,8 @@
 void Projectile::loadEngineSound(const std::string& engineSound)
 {
-  if (this->engineBuffer != NULL)
-    ResourceManager::getInstance()->unload(this->engineBuffer);
-
-  else if (!engineSound.empty())
-  {
-    this->engineBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load(engineSound, WAV);
-    if (this->engineBuffer != NULL)
-    {
-      PRINTF(4)("Loaded sound %s to Pickup: %s.\n", engineSound.c_str(), this->getCName());
-    }
-    else
-    {
-      PRINTF(2)("Failed to load sound %s to engine %s.\n.", engineSound.c_str(), this->getCName());
-    }
-  }
+  if (!engineSound.empty())
+    this->engineBuffer = OrxSound::ResourceSoundBuffer(engineSound);
   else
-    this->engineBuffer = NULL;
+    this->engineBuffer = OrxSound::SoundBuffer();
 }
 
@@ -140,5 +107,5 @@
   //Vector offsetVel =
   this->velocity = velocity;
- // offsetVel.normalize();
+  // offsetVel.normalize();
   //this->velocity += (offsetVel * 50.0);
 }
@@ -174,5 +141,5 @@
 void Projectile::destroy (WorldEntity* killer)
 {
-  if (this->explosionBuffer != NULL)
+  if (this->explosionBuffer.loaded())
     this->soundSource.play(this->explosionBuffer);
 }
Index: branches/new_class_id/src/world_entities/projectiles/projectile.h
===================================================================
--- branches/new_class_id/src/world_entities/projectiles/projectile.h	(revision 9804)
+++ branches/new_class_id/src/world_entities/projectiles/projectile.h	(revision 9805)
@@ -67,6 +67,6 @@
     OrxSound::SoundSource  soundSource;
   private:
-    OrxSound::SoundBuffer* explosionBuffer;
-    OrxSound::SoundBuffer* engineBuffer;
+    OrxSound::SoundBuffer  explosionBuffer;
+    OrxSound::SoundBuffer  engineBuffer;
 };
 
Index: branches/new_class_id/src/world_entities/space_ships/helicopter.cc
===================================================================
--- branches/new_class_id/src/world_entities/space_ships/helicopter.cc	(revision 9804)
+++ branches/new_class_id/src/world_entities/space_ships/helicopter.cc	(revision 9805)
@@ -25,5 +25,5 @@
 
 #include "util/loading/factory.h"
-#include "util/loading/resource_manager.h"
+#include "sound/resource_sound_buffer.h"
 
 #include "key_mapper.h"
@@ -63,7 +63,4 @@
 {
   this->setPlayer(NULL);
-
-  if (this->chopperBuffer != NULL)
-    ResourceManager::getInstance()->unload(this->chopperBuffer);
 }
 
@@ -115,7 +112,5 @@
 
   //load sound
-  if (this->chopperBuffer != NULL)
-    ResourceManager::getInstance()->unload(this->chopperBuffer);
-  this->chopperBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/engine/chopper.wav", WAV);
+  this->chopperBuffer = OrxSound::ResourceSoundBuffer("sound/engine/chopper.wav");
 
 }
@@ -127,6 +122,4 @@
 void Helicopter::init()
 {
-  this->chopperBuffer = NULL;
-
   this->registerObject(this, Helicopter::_objectList);
   PRINTF(4)("HELICOPTER INIT\n");
Index: branches/new_class_id/src/world_entities/space_ships/helicopter.h
===================================================================
--- branches/new_class_id/src/world_entities/space_ships/helicopter.h	(revision 9804)
+++ branches/new_class_id/src/world_entities/space_ships/helicopter.h	(revision 9805)
@@ -80,5 +80,5 @@
 
     OrxSound::SoundSource  soundSource;
-    OrxSound::SoundBuffer* chopperBuffer;
+    OrxSound::SoundBuffer  chopperBuffer;
 
 };
Index: branches/new_class_id/src/world_entities/weapons/weapon.cc
===================================================================
--- branches/new_class_id/src/world_entities/weapons/weapon.cc	(revision 9804)
+++ branches/new_class_id/src/world_entities/weapons/weapon.cc	(revision 9805)
@@ -24,5 +24,4 @@
 #include "world_entities/projectiles/projectile.h"
 
-#include "util/loading/resource_manager.h"
 #include "util/loading/factory.h"
 #include "util/loading/load_param.h"
@@ -32,4 +31,5 @@
 #include "sound_source.h"
 #include "sound_buffer.h"
+#include "resource_sound_buffer.h"
 
 #include "elements/glgui_energywidget.h"
@@ -59,7 +59,4 @@
     if (this->animation[i] && Animation::objectList().exists(animation[i]))  //!< @todo this should check animation3D
       delete this->animation[i];
-  for (int i = 0; i < WA_ACTION_COUNT; i++)
-    if (this->soundBuffers[i] != NULL && OrxSound::SoundBuffer::objectList().exists(this->soundBuffers[i]))
-      ResourceManager::getInstance()->unload(this->soundBuffers[i]);
 
   if (OrxSound::SoundSource::objectList().exists(this->soundSource))
@@ -121,6 +118,4 @@
     this->animation[i] = NULL;                   //< No animation
   }
-  for (int i = 0; i < WA_ACTION_COUNT; i++)
-    this->soundBuffers[i] = NULL;                  //< No Sounds
 
   this->soundSource = new OrxSound::SoundSource(this);       //< Every Weapon has exacty one SoundSource.
@@ -273,11 +268,9 @@
   if (action >= WA_ACTION_COUNT)
     return;
-  if (this->soundBuffers[action] != NULL)
-    ResourceManager::getInstance()->unload(this->soundBuffers[action]);
 
   else if (!soundFile.empty())
   {
-    this->soundBuffers[action] = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load(soundFile, WAV);
-    if (this->soundBuffers[action] != NULL)
+    this->soundBuffers[action] = OrxSound::ResourceSoundBuffer(soundFile);
+    if (this->soundBuffers[action].loaded())
     {
       PRINTF(4)("Loaded sound %s to action %s.\n", soundFile.c_str(), actionToChar(action));
@@ -289,5 +282,5 @@
   }
   else
-    this->soundBuffers[action] = NULL;
+    this->soundBuffers[action] = OrxSound::SoundBuffer();
 }
 
@@ -423,21 +416,21 @@
   {
     case WA_SHOOT:
-      return this->fireW();
-      break;
+    return this->fireW();
+    break;
     case WA_CHARGE:
-      return this->chargeW();
-      break;
+    return this->chargeW();
+    break;
     case WA_RELOAD:
-      return this->reloadW();
-      break;
+    return this->reloadW();
+    break;
     case WA_DEACTIVATE:
-      return this->deactivateW();
-      break;
+    return this->deactivateW();
+    break;
     case WA_ACTIVATE:
-      return this->activateW();
-      break;
+    return this->activateW();
+    break;
     default:
-      PRINTF(2)("Action %s Not Implemented yet \n", Weapon::actionToChar(action));
-      return false;
+    PRINTF(2)("Action %s Not Implemented yet \n", Weapon::actionToChar(action));
+    return false;
   }
 }
@@ -452,5 +445,5 @@
   {
     // play Sound
-    if (likely(this->soundBuffers[WA_ACTIVATE] != NULL))
+    if (likely(this->soundBuffers[WA_ACTIVATE].loaded()))
       this->soundSource->play(this->soundBuffers[WA_ACTIVATE]);
     this->updateWidgets();
@@ -474,5 +467,5 @@
     PRINTF(4)("Deactivating the Weapon %s\n", this->getCName());
     // play Sound
-    if (this->soundBuffers[WA_DEACTIVATE] != NULL)
+    if (this->soundBuffers[WA_DEACTIVATE].loaded())
       this->soundSource->play(this->soundBuffers[WA_DEACTIVATE]);
     // deactivate
@@ -493,5 +486,5 @@
   {
     // playing Sound
-    if (this->soundBuffers[WA_CHARGE] != NULL)
+    if (this->soundBuffers[WA_CHARGE].loaded())
       this->soundSource->play(this->soundBuffers[WA_CHARGE]);
 
@@ -518,5 +511,5 @@
   {
     // playing Sound
-    if (this->soundBuffers[WA_SHOOT] != NULL)
+    if (this->soundBuffers[WA_SHOOT].loaded())
       this->soundSource->play(this->soundBuffers[WA_SHOOT]);
     this->updateWidgets();
@@ -551,5 +544,5 @@
 
 
-  if (this->soundBuffers[WA_RELOAD] != NULL)
+  if (this->soundBuffers[WA_RELOAD].loaded())
     this->soundSource->play(this->soundBuffers[WA_RELOAD]);
 
@@ -694,24 +687,24 @@
   {
     case WA_SHOOT:
-      return "shoot";
-      break;
+    return "shoot";
+    break;
     case WA_CHARGE:
-      return "charge";
-      break;
+    return "charge";
+    break;
     case WA_RELOAD:
-      return "reload";
-      break;
+    return "reload";
+    break;
     case WA_ACTIVATE:
-      return "activate";
-      break;
+    return "activate";
+    break;
     case WA_DEACTIVATE:
-      return "deactivate";
-      break;
+    return "deactivate";
+    break;
     case WA_SPECIAL1:
-      return "special1";
-      break;
+    return "special1";
+    break;
     default:
-      return "none";
-      break;
+    return "none";
+    break;
   }
 }
@@ -757,27 +750,27 @@
   {
     case WS_SHOOTING:
-      return "shooting";
-      break;
+    return "shooting";
+    break;
     case WS_CHARGING:
-      return "charging";
-      break;
+    return "charging";
+    break;
     case WS_RELOADING:
-      return "reloading";
-      break;
+    return "reloading";
+    break;
     case WS_ACTIVATING:
-      return "activating";
-      break;
+    return "activating";
+    break;
     case WS_DEACTIVATING:
-      return "deactivating";
-      break;
+    return "deactivating";
+    break;
     case WS_IDLE:
-      return "idle";
-      break;
+    return "idle";
+    break;
     case WS_INACTIVE:
-      return "inactive";
-      break;
+    return "inactive";
+    break;
     default:
-      return "none";
-      break;
-  }
-}
+    return "none";
+    break;
+  }
+}
Index: branches/new_class_id/src/world_entities/weapons/weapon.h
===================================================================
--- branches/new_class_id/src/world_entities/weapons/weapon.h	(revision 9804)
+++ branches/new_class_id/src/world_entities/weapons/weapon.h	(revision 9805)
@@ -18,4 +18,6 @@
 #include "count_pointer.h"
 #include "ammo_container.h"
+
+#include "sound_buffer.h"
 
 // FORWARD DECLARATION
@@ -219,12 +221,12 @@
     // PHASES //
     ////////////
-    OrxSound::SoundSource* soundSource;                      //!< A SoundSource to play sound from (this is connected to the PNode of the Weapon)
-
-    WeaponState            currentState;                     //!< The State the weapon is in.
-    WeaponAction           requestedAction;                  //!< An action to try to Engage after the currentState ends.
-    float                  stateDuration;                    //!< how long the state has taken until now.
-    float                  times[WS_STATE_COUNT];            //!< Times to stay in the different States @see WeaponState.
-    Animation3D*           animation[WS_STATE_COUNT];        //!< Animations for all the States (you can say yourself on what part of the gun this animation acts).
-    OrxSound::SoundBuffer* soundBuffers[WA_ACTION_COUNT];    //!< SoundBuffers for all actions @see WeaponAction.
+    OrxSound::SoundSource* soundSource;                     //!< A SoundSource to play sound from (this is connected to the PNode of the Weapon)
+
+    WeaponState            currentState;                    //!< The State the weapon is in.
+    WeaponAction           requestedAction;                 //!< An action to try to Engage after the currentState ends.
+    float                  stateDuration;                   //!< how long the state has taken until now.
+    float                  times[WS_STATE_COUNT];           //!< Times to stay in the different States @see WeaponState.
+    Animation3D*           animation[WS_STATE_COUNT];       //!< Animations for all the States (you can say yourself on what part of the gun this animation acts).
+    OrxSound::SoundBuffer  soundBuffers[WA_ACTION_COUNT];   //!< SoundBuffers for all actions @see WeaponAction.
 
     PNode                  emissionPoint;                   //!< The point, where the projectiles are emitted. (this is coppled with the Weapon by default)
Index: branches/new_class_id/src/world_entities/weather_effects/lightning_effect.cc
===================================================================
--- branches/new_class_id/src/world_entities/weather_effects/lightning_effect.cc	(revision 9804)
+++ branches/new_class_id/src/world_entities/weather_effects/lightning_effect.cc	(revision 9805)
@@ -19,5 +19,5 @@
 #include "util/loading/load_param.h"
 #include "util/loading/factory.h"
-#include "util/loading/resource_manager.h"
+#include "sound/resource_sound_buffer.h"
 
 #include "effects/billboard.h"
@@ -128,5 +128,5 @@
 
     //load sound
-    this->thunderBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/atmosphere/thunder.wav", WAV);
+    this->thunderBuffer = OrxSound::ResourceSoundBuffer("sound/atmosphere/thunder.wav");
 
 }
Index: branches/new_class_id/src/world_entities/weather_effects/lightning_effect.h
===================================================================
--- branches/new_class_id/src/world_entities/weather_effects/lightning_effect.h	(revision 9804)
+++ branches/new_class_id/src/world_entities/weather_effects/lightning_effect.h	(revision 9805)
@@ -118,5 +118,5 @@
 
   OrxSound::SoundSource    soundSource;
-  OrxSound::SoundBuffer*   thunderBuffer;
+  OrxSound::SoundBuffer    thunderBuffer;
 
 };
Index: branches/new_class_id/src/world_entities/weather_effects/rain_effect.cc
===================================================================
--- branches/new_class_id/src/world_entities/weather_effects/rain_effect.cc	(revision 9804)
+++ branches/new_class_id/src/world_entities/weather_effects/rain_effect.cc	(revision 9805)
@@ -19,5 +19,5 @@
 #include "util/loading/load_param.h"
 #include "util/loading/factory.h"
-#include "util/loading/resource_manager.h"
+#include "sound/resource_sound_buffer.h"
 
 #include "glincl.h"
@@ -64,13 +64,9 @@
 
     //load rain sound
-    if (this->rainBuffer != NULL)
-        ResourceManager::getInstance()->unload(this->rainBuffer);
-    this->rainBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/atmosphere/rain.wav", WAV);
+    this->rainBuffer = OrxSound::ResourceSoundBuffer("sound/atmosphere/rain.wav");
 
     //load wind sound
     if (this->rainWindForce != 0) {
-        if (this->windBuffer != NULL)
-            ResourceManager::getInstance()->unload(this->windBuffer);
-        this->windBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/atmosphere/wind.wav", WAV);
+      this->windBuffer = OrxSound::ResourceSoundBuffer("sound/atmosphere/wind.wav");
     }
 
@@ -86,10 +82,4 @@
 RainEffect::~RainEffect() {
     this->deactivate();
-
-    if (this->rainBuffer != NULL)
-        ResourceManager::getInstance()->unload(this->rainBuffer);
-
-    if (this->windBuffer != NULL)
-        ResourceManager::getInstance()->unload(this->windBuffer);
 }
 
@@ -101,6 +91,4 @@
     this->rainParticles = NULL;
     this->emitter = NULL;
-    this->rainBuffer = NULL;
-    this->windBuffer = NULL;
     this->lightMan = NULL;
 
Index: branches/new_class_id/src/world_entities/weather_effects/rain_effect.h
===================================================================
--- branches/new_class_id/src/world_entities/weather_effects/rain_effect.h	(revision 9804)
+++ branches/new_class_id/src/world_entities/weather_effects/rain_effect.h	(revision 9805)
@@ -128,6 +128,6 @@
 
   OrxSound::SoundSource       soundSource;
-  OrxSound::SoundBuffer*      rainBuffer;
-  OrxSound::SoundBuffer*      windBuffer;
+  OrxSound::SoundBuffer       rainBuffer;
+  OrxSound::SoundBuffer       windBuffer;
 
   float                       soundRainVolume;
Index: branches/new_class_id/src/world_entities/weather_effects/snow_effect.cc
===================================================================
--- branches/new_class_id/src/world_entities/weather_effects/snow_effect.cc	(revision 9804)
+++ branches/new_class_id/src/world_entities/weather_effects/snow_effect.cc	(revision 9805)
@@ -17,5 +17,5 @@
 #include "util/loading/load_param.h"
 #include "util/loading/factory.h"
-#include "util/loading/resource_manager.h"
+#include "sound/resource_sound_buffer.h"
 
 #include "glincl.h"
@@ -38,6 +38,6 @@
 
 CREATE_SCRIPTABLE_CLASS(SnowEffect,
-                            addMethod("activate", Executor0<SnowEffect, lua_State*>(&SnowEffect::activate))
-                            ->addMethod("deactivate", Executor0<SnowEffect, lua_State*>(&SnowEffect::deactivate))
+                        addMethod("activate", Executor0<SnowEffect, lua_State*>(&SnowEffect::activate))
+                        ->addMethod("deactivate", Executor0<SnowEffect, lua_State*>(&SnowEffect::deactivate))
                        );
 
@@ -48,17 +48,18 @@
   this->registerObject(this, SnowEffect::_objectList);
 
-        this->init();
-
-        if (root != NULL)
-                this->loadParams(root);
-
-        this->windBuffer = NULL;
-        //load wind sound
-        if (this->snowWindForce >= 1) {
-          this->windBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/atmosphere/wind.wav", WAV);
-        }
-
-  if(snowActivate) {
-                this->activate();
+  this->init();
+
+  if (root != NULL)
+    this->loadParams(root);
+
+  //load wind sound
+  if (this->snowWindForce >= 1)
+  {
+    this->windBuffer = OrxSound::ResourceSoundBuffer("sound/atmosphere/wind.wav");
+  }
+
+  if(snowActivate)
+  {
+    this->activate();
     SnowEffect::snowParticles->precache((int) this->snowLife);
   }
@@ -68,5 +69,5 @@
 SnowEffect::~SnowEffect()
 {
-        this->deactivate();
+  this->deactivate();
 }
 
@@ -75,51 +76,51 @@
 void SnowEffect::loadParams(const TiXmlElement* root)
 {
-        WeatherEffect::loadParams(root);
-
-        LoadParam(root, "numParticles", this, SnowEffect, numParticles);
-        LoadParam(root, "materialTexture", this, SnowEffect, materialTexture);
-        LoadParam(root, "lifeSpans", this, SnowEffect, lifeSpan);
-        LoadParam(root, "radius", this, SnowEffect, radius);
-        LoadParam(root, "mass", this, SnowEffect, mass);
-        LoadParam(root, "emissionRate", this, SnowEffect, emissionRate);
-        LoadParam(root, "emissionVelocity", this, SnowEffect, emissionVelocity);
-        LoadParam(root, "wind", this, SnowEffect, wind);
-        LoadParam(root, "size", this, SnowEffect, size);
-        LoadParam(root, "coord", this, SnowEffect, coord);
+  WeatherEffect::loadParams(root);
+
+  LoadParam(root, "numParticles", this, SnowEffect, numParticles);
+  LoadParam(root, "materialTexture", this, SnowEffect, materialTexture);
+  LoadParam(root, "lifeSpans", this, SnowEffect, lifeSpan);
+  LoadParam(root, "radius", this, SnowEffect, radius);
+  LoadParam(root, "mass", this, SnowEffect, mass);
+  LoadParam(root, "emissionRate", this, SnowEffect, emissionRate);
+  LoadParam(root, "emissionVelocity", this, SnowEffect, emissionVelocity);
+  LoadParam(root, "wind", this, SnowEffect, wind);
+  LoadParam(root, "size", this, SnowEffect, size);
+  LoadParam(root, "coord", this, SnowEffect, coord);
   LoadParam(root, "cloudcolor", this, SnowEffect, setCloudColor);
   LoadParam(root, "skycolor", this, SnowEffect, setSkyColor);
   LoadParam(root, "fadetime", this, SnowEffect, setFadeTime);
 
-        LOAD_PARAM_START_CYCLE(root, element);
-        {
-                LoadParam_CYCLE(element, "option", this, SnowEffect, setSnowOption);
-        }
-        LOAD_PARAM_END_CYCLE(element);
+  LOAD_PARAM_START_CYCLE(root, element);
+  {
+    LoadParam_CYCLE(element, "option", this, SnowEffect, setSnowOption);
+  }
+  LOAD_PARAM_END_CYCLE(element);
 }
 
 void SnowEffect::init()
 {
-        this->emitter = new PlaneEmitter();
-
-        // Default values
-        this->snowActivate = false;
-        this->snowMove = false;
-        this->particles = 12000;
-        this->texture = "maps/snow_flake_01_32x32.png";
-        this->snowLife = 8;
-        this->randomLife = 2;
-        this->snowRadius = 3.5;
-        this->randomRadius = 1;
-        this->snowMass = 1.0;
-        this->randomMass = 0.3;
-        this->rate = 900;
-        this->velocity = -100;
-        this->randomVelocity = 5;
-        this->angle = 0.5;
-        this->randomAngle = 0.2;
-        this->alpha = 0.5;
-        this->snowSize = Vector2D(2500, 2500);
-        this->snowCoord = Vector(100,450,400);
-        this->snowWindForce = 1;
+  this->emitter = new PlaneEmitter();
+
+  // Default values
+  this->snowActivate = false;
+  this->snowMove = false;
+  this->particles = 12000;
+  this->texture = "maps/snow_flake_01_32x32.png";
+  this->snowLife = 8;
+  this->randomLife = 2;
+  this->snowRadius = 3.5;
+  this->randomRadius = 1;
+  this->snowMass = 1.0;
+  this->randomMass = 0.3;
+  this->rate = 900;
+  this->velocity = -100;
+  this->randomVelocity = 5;
+  this->angle = 0.5;
+  this->randomAngle = 0.2;
+  this->alpha = 0.5;
+  this->snowSize = Vector2D(2500, 2500);
+  this->snowCoord = Vector(100,450,400);
+  this->snowWindForce = 1;
 
   this->fadeTime = 10;
@@ -130,27 +131,27 @@
 void SnowEffect::activate()
 {
-        PRINTF(3)("Activating SnowEffect\n");
-
-        this->snowActivate = true;
-
-        SnowEffect::snowParticles = new SpriteParticles(particles);
-        SnowEffect::snowParticles->setName("SnowEffectTrailParticles");
-        SnowEffect::snowParticles->setMaterialTexture(texture);
-        SnowEffect::snowParticles->setLifeSpan(snowLife, randomLife);
-        SnowEffect::snowParticles->setRadius(0.0, snowRadius, randomRadius);
-        SnowEffect::snowParticles->setRadius(0.2, snowRadius, randomRadius*0.8);
-        SnowEffect::snowParticles->setRadius(1.0, snowRadius, randomRadius*0.5);
-        SnowEffect::snowParticles->setMass(0, snowMass, randomMass);
-        SnowEffect::snowParticles->setColor(0,1, 1, 1, alpha);
-        SnowEffect::snowParticles->setColor(.5, .6, .6, .6, alpha/2);
-        SnowEffect::snowParticles->setColor(1, .0, .0, .0, .0);
-
-        this->emitter->setSystem(SnowEffect::snowParticles);
-
-        this->emitter->setRelCoor(snowCoord);
-        this->emitter->setEmissionRate(rate);
-        this->emitter->setEmissionVelocity(velocity, randomVelocity);
-        this->emitter->setSpread(angle * this->snowWindForce , randomAngle * this->snowWindForce);
-        this->emitter->setSize(snowSize);
+  PRINTF(3)("Activating SnowEffect\n");
+
+  this->snowActivate = true;
+
+  SnowEffect::snowParticles = new SpriteParticles(particles);
+  SnowEffect::snowParticles->setName("SnowEffectTrailParticles");
+  SnowEffect::snowParticles->setMaterialTexture(texture);
+  SnowEffect::snowParticles->setLifeSpan(snowLife, randomLife);
+  SnowEffect::snowParticles->setRadius(0.0, snowRadius, randomRadius);
+  SnowEffect::snowParticles->setRadius(0.2, snowRadius, randomRadius*0.8);
+  SnowEffect::snowParticles->setRadius(1.0, snowRadius, randomRadius*0.5);
+  SnowEffect::snowParticles->setMass(0, snowMass, randomMass);
+  SnowEffect::snowParticles->setColor(0,1, 1, 1, alpha);
+  SnowEffect::snowParticles->setColor(.5, .6, .6, .6, alpha/2);
+  SnowEffect::snowParticles->setColor(1, .0, .0, .0, .0);
+
+  this->emitter->setSystem(SnowEffect::snowParticles);
+
+  this->emitter->setRelCoor(snowCoord);
+  this->emitter->setEmissionRate(rate);
+  this->emitter->setEmissionVelocity(velocity, randomVelocity);
+  this->emitter->setSpread(angle * this->snowWindForce , randomAngle * this->snowWindForce);
+  this->emitter->setSize(snowSize);
 
   if (this->snowWindForce != 0)
@@ -170,11 +171,8 @@
 void SnowEffect::deactivate()
 {
-        PRINTF(3)("Deactivating SnowEffect\n");
-
-        this->snowActivate = false;
-        this->emitter->setSystem(NULL);
-
-        if (this->windBuffer != NULL)
-                ResourceManager::getInstance()->unload(this->windBuffer);
+  PRINTF(3)("Deactivating SnowEffect\n");
+
+  this->snowActivate = false;
+  this->emitter->setSystem(NULL);
 
   // Restore the old cloud- and sky color
@@ -185,50 +183,51 @@
 void SnowEffect::draw() const
 {
-        if (!this->snowActivate)
-                return;
+  if (!this->snowActivate)
+    return;
 }
 
 void SnowEffect::tick(float dt)
 {
-        if (!this->snowActivate)
-                return;
-
-        /*
-        float distance = (State::getCameraNode()->getAbsCoor() - Vector(snowCoord.x, State::getCameraNode()->getAbsCoor().y, snowCoord.z)).len();
-
-        if(activated)
-        {
-        if(distance > 0.3*snowSize.x || distance > 0.3*snowSize.y)
-                        this->deactivate();
-        else if(distance > 0.25*snowSize.x || distance > 0.25*snowSize.y)
-        this->alpha = 0.15;
-        else if(distance > 0.2*snowSize.x || distance > 0.2*snowSize.y)
-        this->alpha = 0.25;
-        else if(distance > 0.1*snowSize.x || distance > 0.1*snowSize.y)
-        this->alpha = 0.4;
-
-        SnowEffect::snowParticles->setColor(0,1, 1, 1, alpha);
-        SnowEffect::snowParticles->setColor(.5, .6, .6, .6, alpha/2);
-        SnowEffect::snowParticles->setColor(1, .0, .0, .0, .0);
-        }
-        else
-        {
-        if(distance < 0.3*snowSize.x || distance < 0.3*snowSize.y )
-        this->activate();
-        if( distance < 0.25*snowSize.x || distance < 0.25*snowSize.y )
-        this->alpha = 0.25;
-        else if( distance < 0.2*snowSize.x || distance < 0.2*snowSize.y )
-        this->alpha = 0.4;
-        else if( distance < 0.1*snowSize.x || distance < 0.1*snowSize.y )
-        this->alpha = 0.5;
-
-        SnowEffect::snowParticles->setColor(0,1, 1, 1, alpha);
-        SnowEffect::snowParticles->setColor(.5, .6, .6, .6, alpha/2);
-        SnowEffect::snowParticles->setColor(1, .0, .0, .0, .0);
-        }*/
-
-        if (this->snowMove) {
-                this->snowCoord = State::getCameraNode()->getAbsCoor();
-                this->emitter->setRelCoor(this->snowCoord.x , this->snowCoord.y+300, this->snowCoord.z);
-        }
-}
+  if (!this->snowActivate)
+    return;
+
+  /*
+  float distance = (State::getCameraNode()->getAbsCoor() - Vector(snowCoord.x, State::getCameraNode()->getAbsCoor().y, snowCoord.z)).len();
+
+  if(activated)
+  {
+  if(distance > 0.3*snowSize.x || distance > 0.3*snowSize.y)
+                  this->deactivate();
+  else if(distance > 0.25*snowSize.x || distance > 0.25*snowSize.y)
+  this->alpha = 0.15;
+  else if(distance > 0.2*snowSize.x || distance > 0.2*snowSize.y)
+  this->alpha = 0.25;
+  else if(distance > 0.1*snowSize.x || distance > 0.1*snowSize.y)
+  this->alpha = 0.4;
+
+  SnowEffect::snowParticles->setColor(0,1, 1, 1, alpha);
+  SnowEffect::snowParticles->setColor(.5, .6, .6, .6, alpha/2);
+  SnowEffect::snowParticles->setColor(1, .0, .0, .0, .0);
+  }
+  else
+  {
+  if(distance < 0.3*snowSize.x || distance < 0.3*snowSize.y )
+  this->activate();
+  if( distance < 0.25*snowSize.x || distance < 0.25*snowSize.y )
+  this->alpha = 0.25;
+  else if( distance < 0.2*snowSize.x || distance < 0.2*snowSize.y )
+  this->alpha = 0.4;
+  else if( distance < 0.1*snowSize.x || distance < 0.1*snowSize.y )
+  this->alpha = 0.5;
+
+  SnowEffect::snowParticles->setColor(0,1, 1, 1, alpha);
+  SnowEffect::snowParticles->setColor(.5, .6, .6, .6, alpha/2);
+  SnowEffect::snowParticles->setColor(1, .0, .0, .0, .0);
+  }*/
+
+  if (this->snowMove)
+  {
+    this->snowCoord = State::getCameraNode()->getAbsCoor();
+    this->emitter->setRelCoor(this->snowCoord.x , this->snowCoord.y+300, this->snowCoord.z);
+  }
+}
Index: branches/new_class_id/src/world_entities/weather_effects/snow_effect.h
===================================================================
--- branches/new_class_id/src/world_entities/weather_effects/snow_effect.h	(revision 9804)
+++ branches/new_class_id/src/world_entities/weather_effects/snow_effect.h	(revision 9805)
@@ -137,5 +137,5 @@
   static SpriteParticles*   snowParticles;
   OrxSound::SoundSource     soundSource;
-  OrxSound::SoundBuffer*    windBuffer;
+  OrxSound::SoundBuffer     windBuffer;
 
   Vector            oldSkyColor;
