Index: /branches/new_class_id/src/lib/Makefile.am
===================================================================
--- /branches/new_class_id/src/lib/Makefile.am	(revision 9704)
+++ /branches/new_class_id/src/lib/Makefile.am	(revision 9705)
@@ -16,6 +16,6 @@
 		data/data_tank.h
 
-SUBDIRS = \
-	. \
+SUBDIRS =
+#	. \
 	math \
 	lang \
Index: /branches/new_class_id/src/lib/lang/base_object.h
===================================================================
--- /branches/new_class_id/src/lib/lang/base_object.h	(revision 9704)
+++ /branches/new_class_id/src/lib/lang/base_object.h	(revision 9705)
@@ -48,4 +48,5 @@
   inline const std::string& getClassName() const { return _classes.front()._objectList->name(); }
 
+  inline const NewClassID& getClassID() const { return *_leafClassID; }
   /** @returns the ID of the Topmost object of the ClassStack */
   inline const int& getLeafClassID() const { return _leafClassID->id(); }
Index: /branches/new_class_id/src/lib/lang/new_object_list.cc
===================================================================
--- /branches/new_class_id/src/lib/lang/new_object_list.cc	(revision 9704)
+++ /branches/new_class_id/src/lib/lang/new_object_list.cc	(revision 9705)
@@ -104,4 +104,35 @@
 
 /**
+ * @brief searches for a NewClassID in the list of all NewObjectLists, and returns its Identity
+ * @param id: The Id to search for
+ * @returns the ClassID if found and NullClass' identity if not.
+ */
+const NewClassID& NewObejctListBase::retrieveIdentity(int id)
+{
+  const NewObjectListBase* const base = NewObjectListBase::getObjectList(id);
+
+  if (base != NULL)
+    return base->_identity;
+  else
+    return NullClass::classID();
+}
+
+/**
+ * @brief searches for a NewClassID in the list of all NewObjectLists, and returns its Identity
+ * @param name: The Name to search for
+ * @returns the ClassID if found and NullClass' identity if not.
+ */
+const NewClassID& NewObjectListBase::retrieveIdentity(const std::string& name)
+{
+  const NewObjectListBase* const base = NewObjectListBase::getObjectList(name);
+
+  if (base != NULL)
+    return base->_identity;
+  else
+    return NullObject::classID();
+}
+
+
+/**
  * @brief Checks if a Class with name already exists.
  * @param name The Name of the Class to check.
Index: /branches/new_class_id/src/lib/lang/new_object_list.h
===================================================================
--- /branches/new_class_id/src/lib/lang/new_object_list.h	(revision 9704)
+++ /branches/new_class_id/src/lib/lang/new_object_list.h	(revision 9705)
@@ -44,19 +44,44 @@
   //! A fast iterator Base-Class, for iterator-casting and storing.
   /**
-   * @note This Iterator is explicitely used only for storage purposes
+   * @note This Iterator is explicitely used only for storage purposes in the BaseObject
    */
   class IteratorBase { };
 
+  typedef std::list<BaseObject*>            base_list;
+  typedef base_list::iterator               base_iterator;
+
 public:
+  /** @returns The Identity of the Class stored within. */
   inline const NewClassID& identity() const { return _identity; }
+  /** @returns the ID of the Identity of the ObjectList */
   inline int id() const { return _id; };
+  /** @returns The Name of the Class stored in this ObjectList */
   inline const std::string& name() const { return _name; };
-  bool operator==(int id) const { return _id == id; };
-  bool operator==(const NewClassID& id) const { return id == _id; };
-  bool operator==(const std::string& name) const { return _name == name; };
-
-  void acquireID(const int*& id, const std::string*& name) const { id = &_id; name = &_name; };
-
-  virtual void debug() const = 0;
+  /** @param id The id to compare @returns true on match, false otherwise */
+  inline bool operator==(int id) const { return _id == id; };
+  /** @param id The id to compare @returns true on match, false otherwise */
+  inline bool operator==(const NewClassID& id) const { return id == _id; };
+  /** @param name The name to compare @returns true on match, false otherwise */
+  inline bool operator==(const std::string& name) const { return _name == name; };
+  /** @param id The id to check @returns true on match, false otherwise */
+  inline void acquireID(const int*& id, const std::string*& name) const { id = &_id; name = &_name; };
+  /** @brief fills a list of Objects into a BaseObject*-List. @param list the list to fill */
+  virtual void getBaseObjectList(base_list* list) const = 0;
+
+  static const NewClassID& retrieveIdentity(int id);
+  static const NewClassID& retrieveIdentity(const std::string& name);
+
+  static const NewObjectListBase* const getObjectList(int classID);
+  static const NewObjectListBase* const getObjectList(const std::string& className);
+  static const NewObjectListBase* const getObjectList(const NewClassID& classID);
+
+  static BaseObject* getBaseObject(int classID, const std::string& objectName);
+  static BaseObject* getBaseObject(const std::string& className, const std::string& objectName);
+  static BaseObject* getBaseObject(const NewClassID& classID, const std::string& objectName);
+
+  /** @returns an Object with Name name out of this List @param name the name of the Object. */
+  virtual BaseObject* getBaseObject(const std::string& name) const = 0;
+
+  static const std::list<std::string>&  getClassNames();
 
   static unsigned int                   classCount();
@@ -64,23 +89,8 @@
   static int                            StringToID(const std::string& className);
 
-  static const std::list<std::string>&  getClassNames();
-
+  virtual void debug() const = 0;
+
+  //! Only uset to unsubscribe a BaseObject.
   virtual void unregisterObject(IteratorBase* _iterators) = 0;
-
-public:
-  typedef std::list<BaseObject*>            base_list;
-  typedef std::list<BaseObject*>::iterator  base_iterator;
-
-  virtual void getBaseObjectList(base_list* list) const = 0;
-
-  static const NewObjectListBase* const getObjectList(int classID);
-  static const NewObjectListBase* const getObjectList(const std::string& className);
-  static const NewObjectListBase* const getObjectList(const NewClassID& classID);
-
-  static BaseObject* getBaseObject(int classID, const std::string& objectName);
-  static BaseObject* getBaseObject(const std::string& className, const std::string& objectName);
-  static BaseObject* getBaseObject(const NewClassID& classID, const std::string& objectName);
-
-  virtual BaseObject* getBaseObject(const std::string& name) const = 0;
 
 protected:
@@ -99,4 +109,5 @@
   typedef std::map<std::string, NewObjectListBase*> classNameMap; //!< The Generic Map.
 
+private:
   int                           _id;
   const std::string             _name;              //!< The Name of the Class.
@@ -146,4 +157,5 @@
   T*                      getObject(const std::string& name) const;
   inline const list&      objects() const { return _objects; };
+  bool exists(const T* const object) const;
 
   inline iterator begin() { return _objects.begin(); };
@@ -157,6 +169,7 @@
   inline T* back() const { return _objects.back(); };
 
+
   NewObjectListBase::IteratorBase* registerObject(T* object);
-  void unregisterObject(IteratorBase* iterator);
+  virtual void unregisterObject(IteratorBase* iterator);
 
   virtual void debug() const;
@@ -233,4 +246,16 @@
 
 /**
+ * @brief checks if Object object exists in this ClassList.
+ * @param object the Object to check for
+ * @returns True if the object is found within the List, false otherwise
+ */
+template <class T>
+    bool NewObjectList<T>::exists(const T* const object) const
+{
+  return (std::find(_objects.begin(), _objects.end(), object) != _objects.end());
+}
+
+
+/**
  * @brief retrieves a List of BaseObjects
  * @param list the list to push the ObjectList into.
Index: /branches/new_class_id/src/util/animation/animation.cc
===================================================================
--- /branches/new_class_id/src/util/animation/animation.cc	(revision 9704)
+++ /branches/new_class_id/src/util/animation/animation.cc	(revision 9705)
@@ -20,4 +20,5 @@
 #include "animation_player.h"
 
+NewObjectListDefinition(Animation);
 /**
  *  creates a new Animation
@@ -27,5 +28,5 @@
 Animation::Animation()
 {
-  this->setClassID(CL_ANIMATION, "Animation");
+  this->registerObject(this, Animation::_objectList);
 
   // initialize a beginning KeyFrame, that will be deleted afterwards
Index: /branches/new_class_id/src/util/animation/animation.h
===================================================================
--- /branches/new_class_id/src/util/animation/animation.h	(revision 9704)
+++ /branches/new_class_id/src/util/animation/animation.h	(revision 9705)
@@ -73,5 +73,6 @@
 class Animation : public BaseObject
 {
- public:
+  NewObjectListDeclaration(Animation);
+public:
   virtual ~Animation();
 
@@ -95,10 +96,10 @@
   inline bool ifDelete() { return bDelete; };
 
- protected:
+protected:
   Animation();
 
   void handleInfinity();
 
- protected:
+protected:
   // variables
   float                 localTime;              //!< The Time passed since the beginning of the currentKeyFrame.
@@ -119,9 +120,9 @@
 class aTest
 {
- public:
+public:
   inline aTest() { last = 0.0;}
   /** a little debug information to show the results of this class @param f new value */
   inline void littleDebug(float f) {  diff = f - last; printf("f=%f, diff=%f\n", f,diff); last = f;}
- private:
+private:
   float     diff;           //!< difference from the last value
   float     last;           //!< the last calculated value
Index: /branches/new_class_id/src/util/animation/animation_player.cc
===================================================================
--- /branches/new_class_id/src/util/animation/animation_player.cc	(revision 9704)
+++ /branches/new_class_id/src/util/animation/animation_player.cc	(revision 9705)
@@ -22,5 +22,5 @@
 
 
-
+NewObjectListDefinition(AnimationPlayer);
 /**
  *  standard constructor
@@ -28,5 +28,5 @@
 AnimationPlayer::AnimationPlayer ()
 {
-  this->setClassID(CL_ANIMATION_PLAYER, "AnimationPlayer");
+  this->registerObject(this, AnimationPlayer::_objectList);
   this->setName("AnimationPlayer");
 
Index: /branches/new_class_id/src/util/animation/animation_player.h
===================================================================
--- /branches/new_class_id/src/util/animation/animation_player.h	(revision 9704)
+++ /branches/new_class_id/src/util/animation/animation_player.h	(revision 9705)
@@ -28,7 +28,9 @@
    eveything else will be done by the AnimationPlayer itself.\n
 */
-class AnimationPlayer : public BaseObject {
+class AnimationPlayer : public BaseObject
+{
+  NewObjectListDeclaration(AnimationPlayer);
 
- public:
+public:
   /** @returns a Pointer to the only object of this Class */
   inline static AnimationPlayer* getInstance() { if (!singletonRef) singletonRef = new AnimationPlayer();  return singletonRef; };
@@ -50,5 +52,5 @@
   void debug();
 
- private:
+private:
   /* singleton */
   AnimationPlayer();
Index: /branches/new_class_id/src/util/kill_target.cc
===================================================================
--- /branches/new_class_id/src/util/kill_target.cc	(revision 9704)
+++ /branches/new_class_id/src/util/kill_target.cc	(revision 9705)
@@ -22,6 +22,7 @@
 
 
-
+#include "class_id.h"
 CREATE_FACTORY(KillTarget, CL_KILL_TARGET);
+NewObjectListDefinitionID(KillTarget, CL_KILL_TARGET);
 
 
@@ -32,5 +33,5 @@
 KillTarget::KillTarget (const TiXmlElement* root)
         : MissionGoal(root) {
-    this->setClassID(CL_KILL_TARGET, "KillTarget");
+  this->registerObject(this, KillTarget::_objectList);
 
     if( root != NULL)
Index: /branches/new_class_id/src/util/kill_target.h
===================================================================
--- /branches/new_class_id/src/util/kill_target.h	(revision 9704)
+++ /branches/new_class_id/src/util/kill_target.h	(revision 9705)
@@ -17,4 +17,5 @@
 class KillTarget : public MissionGoal
 {
+  NewObjectListDeclaration(KillTarget);
 
   public:
Index: /branches/new_class_id/src/util/mission_goal.cc
===================================================================
--- /branches/new_class_id/src/util/mission_goal.cc	(revision 9704)
+++ /branches/new_class_id/src/util/mission_goal.cc	(revision 9705)
@@ -24,5 +24,5 @@
 
 
-
+NewObjectListDefinition(MissionGoal);
 /**
  * standard constructor
@@ -31,5 +31,5 @@
 MissionGoal::MissionGoal (const TiXmlElement* root)
 {
-   this->setClassID(CL_MISSION_GOAL, "MissionGoal");
+  this->registerObject(this, MissionGoal::_objectList);
 
    this->missionState = MS_PASSIVE;
Index: /branches/new_class_id/src/util/mission_goal.h
===================================================================
--- /branches/new_class_id/src/util/mission_goal.h	(revision 9704)
+++ /branches/new_class_id/src/util/mission_goal.h	(revision 9705)
@@ -26,4 +26,5 @@
 //! A class representing a mission goal
 class MissionGoal : public BaseObject {
+  NewObjectListDeclaration(MissionGoal);
 
  public:
Index: /branches/new_class_id/src/util/multiplayer_team_deathmatch.cc
===================================================================
--- /branches/new_class_id/src/util/multiplayer_team_deathmatch.cc	(revision 9704)
+++ /branches/new_class_id/src/util/multiplayer_team_deathmatch.cc	(revision 9705)
@@ -56,5 +56,5 @@
  */
 MultiplayerTeamDeathmatch::MultiplayerTeamDeathmatch(const TiXmlElement* root)
-  : NetworkGameRules(root)
+    : NetworkGameRules(root)
 {
   this->registerObject(this, MultiplayerTeamDeathmatch::_objectList);
@@ -111,11 +111,11 @@
 
   LoadParam(root, "death-penalty-timeout", this, MultiplayerTeamDeathmatch, setDeathPenaltyTimeout)
-      .describe("sets the time in seconds a player has to wait for respawn");
+  .describe("sets the time in seconds a player has to wait for respawn");
 
   LoadParam(root, "max-kills", this, MultiplayerTeamDeathmatch, setMaxKills)
-      .describe("sets the maximal kills for winning condition");
+  .describe("sets the maximal kills for winning condition");
 
   LoadParam(root, "num-teams", this, MultiplayerTeamDeathmatch, setNumTeams)
-      .describe("sets number of teams");
+  .describe("sets number of teams");
 
 }
@@ -189,8 +189,8 @@
   }
 
-//   if( PlayerStats::getStats( SharedNetworkData::getInstance()->getHostID() ) )
-//   {
-//     PRINTF(0)("prefered team id: %i, noteam: %i\n", PlayerStats::getStats( SharedNetworkData::getInstance()->getHostID() )->getPreferedTeamId(), TEAM_NOTEAM);
-//   }
+  //   if( PlayerStats::getStats( SharedNetworkData::getInstance()->getHostID() ) )
+  //   {
+  //     PRINTF(0)("prefered team id: %i, noteam: %i\n", PlayerStats::getStats( SharedNetworkData::getInstance()->getHostID() )->getPreferedTeamId(), TEAM_NOTEAM);
+  //   }
 
   // check if the menu should be removed and the game state should be entered
@@ -270,5 +270,4 @@
   if( unlikely( this->bLocalPlayerDead))
   {
-
   }
 }
@@ -305,8 +304,8 @@
 {
   if ( team == TEAM_NOTEAM || team == TEAM_SPECTATOR )
-    return CL_SPECTATOR;
+    return NewObjectListBase::retrieveIdentity("Spectator");
 
   if ( team == 0 || team == 1 )
-    return CL_TURBINE_HOVER;
+    return NewObjectListBase::retrieveIdentity("TurbineHover");
 
   assert( false );
@@ -314,8 +313,8 @@
 
 
-std::string MultiplayerTeamDeathmatch::getPlayableModelFileName( int userId, int team, ClassID classId )
+std::string MultiplayerTeamDeathmatch::getPlayableModelFileName( int userId, int team, const NewClassID& classId )
 {
   if (classId == CL_TURBINE_HOVER)
-   return "models/ships/hoverglider_mainbody.obj";
+    return "models/ships/hoverglider_mainbody.obj";
   if ( team == 0 )
     return "models/creatures/doom_guy.md2";
@@ -326,5 +325,5 @@
 }
 
-std::string MultiplayerTeamDeathmatch::getPlayableModelTextureFileName( int userId, int team, ClassID classId )
+std::string MultiplayerTeamDeathmatch::getPlayableModelTextureFileName( int userId, int team, const NewClassID& classId )
 {
   if ( classId == CL_FPS_PLAYER )
@@ -339,7 +338,7 @@
 }
 
-float MultiplayerTeamDeathmatch::getPlayableScale( int userId, int team, ClassID classId )
-{
-  if ( classId == CL_FPS_PLAYER )
+float MultiplayerTeamDeathmatch::getPlayableScale( int userId, int team, const NewClassID& classId )
+{
+  if ( classId == NewObjectListBase::retrieveIdentity(CL_FPS_PLAYER))
   {
     return 10.0f;
@@ -359,13 +358,9 @@
     teamScore[i] = 0;
 
-
-  const std::list<BaseObject*> * list = ClassList::getList( CL_PLAYER_STATS );
-
-  if ( !list )
-    return;
-
-  for ( std::list<BaseObject*>::const_iterator it = list->begin(); it != list->end(); it++ )
-  {
-    PlayerStats & stats = *dynamic_cast<PlayerStats*>(*it);
+  for (NewObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin();
+       it != PlayerStats::objectList().end();
+       ++it)
+  {
+    PlayerStats & stats = *(*it);
 
     if ( stats.getTeamId() >= 0 )
@@ -387,12 +382,9 @@
     playersInTeam[i] = 0;
 
-  const std::list<BaseObject*> * list = ClassList::getList( CL_PLAYER_STATS );
-
-  if ( !list )
-    return 0;
-
-  for ( std::list<BaseObject*>::const_iterator it = list->begin(); it != list->end(); it++ )
-  {
-    PlayerStats & stats = *dynamic_cast<PlayerStats*>(*it);
+  for (NewObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin();
+       it != PlayerStats::objectList().end();
+       ++it)
+  {
+    PlayerStats & stats = *(*it);
 
     if ( stats.getTeamId() >= 0 )
@@ -450,13 +442,9 @@
 void MultiplayerTeamDeathmatch::handleTeamChanges( )
 {
-  const std::list<BaseObject*> * list = ClassList::getList( CL_PLAYER_STATS );
-
-  if ( !list )
-    return;
-
-  //first server players with choices
-  for ( std::list<BaseObject*>::const_iterator it = list->begin(); it != list->end(); it++ )
-  {
-    PlayerStats & stats = *dynamic_cast<PlayerStats*>(*it);
+  for (NewObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin();
+       it != PlayerStats::objectList().end();
+       ++it)
+  {
+    PlayerStats & stats = *(*it);
 
     if ( stats.getTeamId() != stats.getPreferedTeamId() )
@@ -470,7 +458,9 @@
 
   //now serve player who want join a random team
-  for ( std::list<BaseObject*>::const_iterator it = list->begin(); it != list->end(); it++ )
-  {
-    PlayerStats & stats = *dynamic_cast<PlayerStats*>(*it);
+  for (NewObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin();
+       it != PlayerStats::objectList().end();
+       ++it)
+  {
+    PlayerStats & stats = *(*it);
 
     if ( stats.getTeamId() != stats.getPreferedTeamId() )
@@ -501,5 +491,5 @@
 
 
-  ClassID       playableClassId  = getPlayableClassId( userId, stats.getPreferedTeamId() );
+  NewClassID       playableClassId  = getPlayableClassId( userId, stats.getPreferedTeamId() );
   std::string   playableModel    = getPlayableModelFileName( userId, stats.getPreferedTeamId(), playableClassId );
   std::string   playableTexture  = getPlayableModelTextureFileName( userId, stats.getPreferedTeamId(), playableClassId );
@@ -584,5 +574,6 @@
     if ( event.bPressed )
       this->bShowTeamChange = true;
-  } else if ( event.type == SDLK_F1 )
+  }
+  else if ( event.type == SDLK_F1 )
   {
     if ( this->statsBox && !this->bLocalPlayerDead && event.bPressed )
@@ -680,9 +671,9 @@
 void MultiplayerTeamDeathmatch::hideStats( )
 {
-    if ( statsBox )
-    {
-      delete statsBox;
-      statsBox = NULL;
-    }
+  if ( statsBox )
+  {
+    delete statsBox;
+    statsBox = NULL;
+  }
 }
 
@@ -819,13 +810,12 @@
 void MultiplayerTeamDeathmatch::respawnPlayable( Playable * playable, int teamId, float delay )
 {
-  const std::list<BaseObject*> * list = ClassList::getList( CL_SPAWNING_POINT );
-
-  assert( list );
 
   std::vector<SpawningPoint*> spList;
 
-  for ( std::list<BaseObject*>::const_iterator it = list->begin(); it != list->end(); it++ )
-  {
-    SpawningPoint * sp = dynamic_cast<SpawningPoint*>(*it);
+  for (NewObjectList<SpawningPoint>::const_iterator it = SpawningPoint::objectList().begin();
+       it != SpawningPoint::objectList().end();
+       ++it)
+  {
+    SpawningPoint * sp = (*it);
 
     if ( sp->getTeamId() == teamId )
@@ -835,7 +825,9 @@
   if ( spList.size() == 0 )
   {
-    for ( std::list<BaseObject*>::const_iterator it = list->begin(); it != list->end(); it++ )
-    {
-      SpawningPoint * sp = dynamic_cast<SpawningPoint*>(*it);
+    for (NewObjectList<SpawningPoint>::const_iterator it = SpawningPoint::objectList().begin();
+	 it != SpawningPoint::objectList().end();
+	 ++it)
+    {
+      SpawningPoint * sp = (*it);
 
       if ( sp->getTeamId() < 0 )
Index: /branches/new_class_id/src/util/singleplayer_shootemup.cc
===================================================================
--- /branches/new_class_id/src/util/singleplayer_shootemup.cc	(revision 9704)
+++ /branches/new_class_id/src/util/singleplayer_shootemup.cc	(revision 9705)
@@ -25,8 +25,7 @@
 
 
-
+#include "class_id.h"
 CREATE_FACTORY(SingleplayerShootemup, CL_SINGLEPLAYER_SHOOTEMUP);
-
-
+NewObjectListDefinitionID(SingleplayerShootemup, CL_SINGLEPLAYER_SHOOTEMUP);
 
 /**
@@ -36,5 +35,5 @@
   : GameRules(root)
 {
-  this->setClassID(CL_SINGLEPLAYER_SHOOTEMUP, "SingleplayerShootemup");
+  this->registerObject(this, SingleplayerShootemup::_objectList);
 
   if( root != NULL)
Index: /branches/new_class_id/src/util/singleplayer_shootemup.h
===================================================================
--- /branches/new_class_id/src/util/singleplayer_shootemup.h	(revision 9704)
+++ /branches/new_class_id/src/util/singleplayer_shootemup.h	(revision 9705)
@@ -18,5 +18,5 @@
 class SingleplayerShootemup : public GameRules
 {
-
+  NewObjectListDeclaration(SingleplayerShootemup);
   public:
     SingleplayerShootemup(const TiXmlElement* root = NULL);
Index: /branches/new_class_id/src/util/track/pilot_node.cc
===================================================================
--- /branches/new_class_id/src/util/track/pilot_node.cc	(revision 9704)
+++ /branches/new_class_id/src/util/track/pilot_node.cc	(revision 9705)
@@ -24,4 +24,5 @@
 
 
+NewObjectListDefinition(PilotNode);
 /**
  *  standard constructor
@@ -29,5 +30,5 @@
 PilotNode::PilotNode ()
 {
-   this->setClassID(CL_PILOT_PARENT, "PilotNode");
+  this->registerObject(this, PilotNode::_objectList);
    this->setName("PilotNode");
 
Index: /branches/new_class_id/src/util/track/pilot_node.h
===================================================================
--- /branches/new_class_id/src/util/track/pilot_node.h	(revision 9704)
+++ /branches/new_class_id/src/util/track/pilot_node.h	(revision 9705)
@@ -15,4 +15,5 @@
 //! The PilotNode is a node that enables the is driven by the Mouse
 class PilotNode : public WorldEntity, public EventListener {
+  NewObjectListDeclaration(PilotNode);
 
  public:
Index: /branches/new_class_id/src/world_entities/camera.cc
===================================================================
--- /branches/new_class_id/src/world_entities/camera.cc	(revision 9704)
+++ /branches/new_class_id/src/world_entities/camera.cc	(revision 9705)
@@ -19,4 +19,6 @@
 #include "glincl.h"
 
+NewObjectListDefinition(Camera);
+
 /**
  *  creates a Camera
@@ -24,5 +26,5 @@
 Camera::Camera()
 {
-  this->setClassID(CL_CAMERA, "Camera");
+  this->registerObject(this, Camera::_objectList);
   this->setName("camera");
   this->target = new CameraTarget();
@@ -221,8 +223,8 @@
 ///////////////////
 
-
+NewObjectListDefinition(CameraTarget);
 CameraTarget::CameraTarget()
 {
-  this->setClassID(CL_CAMERA_TARGET, "CameraTarget");
+  this->registerObject(this, CameraTarget::_objectList);
   //  this->setParentMode(PNODE_MOVEMENT);
 }
Index: /branches/new_class_id/src/world_entities/camera.h
===================================================================
--- /branches/new_class_id/src/world_entities/camera.h	(revision 9704)
+++ /branches/new_class_id/src/world_entities/camera.h	(revision 9705)
@@ -22,4 +22,5 @@
 class Camera : public PNode, public EventListener
 {
+  NewObjectListDeclaration(Camera);
 public:
   //! an enumerator for different types of view
@@ -84,4 +85,5 @@
 {
   friend class Camera;             //! The CameraTarget is a friend of Camera. noone else needs a CameraTarget, so noone else can create it.
+  NewObjectListDeclaration(CameraTarget);
 
 private:
Index: /branches/new_class_id/src/world_entities/npcs/npc.cc
===================================================================
--- /branches/new_class_id/src/world_entities/npcs/npc.cc	(revision 9704)
+++ /branches/new_class_id/src/world_entities/npcs/npc.cc	(revision 9705)
@@ -20,8 +20,9 @@
 #include "npc.h"
 
+NewObjectListDefinition(NPC);
 
 NPC::NPC(const TiXmlElement* root)
 {
-  this->setClassID(CL_NPC, "NPC");
+  this->registerObject(this, NPC::_objectList);
 
   this->toList(OM_GROUP_00);
Index: /branches/new_class_id/src/world_entities/npcs/npc.h
===================================================================
--- /branches/new_class_id/src/world_entities/npcs/npc.h	(revision 9704)
+++ /branches/new_class_id/src/world_entities/npcs/npc.h	(revision 9705)
@@ -8,5 +8,5 @@
 
 class NPC : public WorldEntity {
-
+  NewObjectListDeclaration(NPC);
  public:
    NPC (const TiXmlElement* root);
Index: /branches/new_class_id/src/world_entities/npcs/npc_test1.cc
===================================================================
--- /branches/new_class_id/src/world_entities/npcs/npc_test1.cc	(revision 9704)
+++ /branches/new_class_id/src/world_entities/npcs/npc_test1.cc	(revision 9705)
@@ -25,9 +25,10 @@
 #include "power_ups/laser_power_up.h"
 
+NewObjectListDefinition(NPCTest1);
 
 NPCTest1::NPCTest1()
   : NPC(NULL)
 {
-  this->setClassID(CL_NPC_TEST1, "NPCTest1");
+  this->registerObject(this, NPCTest1::_objectList);
 
   if ((float)rand()/RAND_MAX > .5f)
Index: /branches/new_class_id/src/world_entities/npcs/npc_test1.h
===================================================================
--- /branches/new_class_id/src/world_entities/npcs/npc_test1.h	(revision 9704)
+++ /branches/new_class_id/src/world_entities/npcs/npc_test1.h	(revision 9705)
@@ -8,5 +8,5 @@
 
 class NPCTest1 : public NPC {
-
+  NewObjectListDeclaration(NPCTest1);
  public:
   NPCTest1 ();
Index: /branches/new_class_id/src/world_entities/playable.cc
===================================================================
--- /branches/new_class_id/src/world_entities/playable.cc	(revision 9704)
+++ /branches/new_class_id/src/world_entities/playable.cc	(revision 9705)
@@ -41,5 +41,5 @@
 SHELL_COMMAND_STATIC(orxoWeapon, Playable, Playable::addSomeWeapons_CHEAT)
   ->setAlias("orxoWeapon");
-NewObjectListDefinition(Playable)
+NewObjectListDefinition(Playable);
 
 Playable::Playable()
@@ -48,5 +48,5 @@
     playmode(Playable::Full3D)
 {
-  this->registerObject(this, Playable::_classID);
+  this->registerObject(this, Playable::_objectList);
   PRINTF(4)("PLAYABLE INIT\n");
 
@@ -109,11 +109,12 @@
 bool Playable::pickup(PowerUp* powerUp)
 {
-  if(powerUp->isA(CL_WEAPON_POWER_UP))
-  {
-    return dynamic_cast<WeaponPowerUp*>(powerUp)->process(&this->getWeaponManager());
-  }
-  else if(powerUp->isA(CL_PARAM_POWER_UP))
-  {
-    ParamPowerUp* ppu = dynamic_cast<ParamPowerUp*>(powerUp);
+  /// FIXME TOTALLY
+  if(powerUp->isA(WeaponPowerUp::classID()))
+  {
+    return static_cast<WeaponPowerUp*>(powerUp)->process(&this->getWeaponManager());
+  }
+  else if(powerUp->isA(ParamPowerUp::classID()))
+  {
+    ParamPowerUp* ppu = static_cast<ParamPowerUp*>(powerUp);
     switch(ppu->getType())
     {
@@ -213,9 +214,9 @@
     {
       PRINTF(2)("ADDING WEAPONS - you cheater\n");
-      playable->addWeapon(Weapon::createWeapon(CL_HYPERBLASTER));
-      playable->addWeapon(Weapon::createWeapon(CL_TURRET));
-      playable->addWeapon(Weapon::createWeapon(CL_AIMING_TURRET));
-      playable->addWeapon(Weapon::createWeapon(CL_CANNON));
-      playable->addWeapon(Weapon::createWeapon(CL_TARGETING_TURRET));
+      playable->addWeapon(Weapon::createWeapon("Hyperblaster"));
+      playable->addWeapon(Weapon::createWeapon("Turret"));
+      playable->addWeapon(Weapon::createWeapon("AimingTurret"));
+      playable->addWeapon(Weapon::createWeapon("Cannon"));
+      playable->addWeapon(Weapon::createWeapon("TargetingTurret"));
       PRINTF(2)("ADDING WEAPONS FINISHED\n");
     }
Index: /branches/new_class_id/src/world_entities/player.cc
===================================================================
--- /branches/new_class_id/src/world_entities/player.cc	(revision 9704)
+++ /branches/new_class_id/src/world_entities/player.cc	(revision 9705)
@@ -19,6 +19,4 @@
 #include "event_handler.h"
 
-
-#include "class_list.h"
 #include "state.h"
 #include "util/hud.h"
@@ -26,5 +24,5 @@
 #include "debug.h"
 
-
+NewObjectListDefinition(Player);
 /**
  * creates a new Player
@@ -33,5 +31,5 @@
 {
   //  this->setRelDir(Quaternion(M_PI, Vector(1,0,0)));
-  this->setClassID(CL_PLAYER, "Player");
+  this->registerObject(this, Player::_objectList);
 
   PRINTF(4)("PLAYER INIT\n");
@@ -94,8 +92,8 @@
 
 
- void Player::weaponConfigChanged()
- {
-   this->_hud.updateWeaponManager();
- }
+void Player::weaponConfigChanged()
+{
+  this->_hud.updateWeaponManager();
+}
 
 
@@ -103,17 +101,16 @@
 {
   /// FIXME this should be in the ObjectManager
-  const std::list<BaseObject*>* objectList = ClassList::getList(CL_PLAYABLE);
-  if (objectList != NULL)
+  for (NewObjectList<Playable>::const_iterator node = Playable::objectList().begin();
+       node != Playable::objectList().end();
+       ++node)
   {
-    std::list<BaseObject*>::const_iterator node;
-    for (node = objectList->begin(); node != objectList->end(); node++)
-      if (this->playable != (*node) &&
-          (dynamic_cast<PNode*>(*node)->getAbsCoor() - this->playable->getAbsCoor()).len() < (dynamic_cast<Playable*>(*node)->getEnterRadius()))
-      {
+    if (this->playable != (*node) &&
+        ((*node)->getAbsCoor() - this->playable->getAbsCoor()).len() < ((*node)->getEnterRadius()))
+    {
 
-        this->setPlayable(dynamic_cast<Playable*>(*node));
+      this->setPlayable(*(node));
 
-        break;
-      }
+      break;
+    }
   }
 }
Index: /branches/new_class_id/src/world_entities/player.h
===================================================================
--- /branches/new_class_id/src/world_entities/player.h	(revision 9704)
+++ /branches/new_class_id/src/world_entities/player.h	(revision 9705)
@@ -23,4 +23,5 @@
 class Player : public EventListener
 {
+  NewObjectListDeclaration(Player);
 
   public:
@@ -31,5 +32,5 @@
     bool              eject();
     inline Playable*  getPlayable() const  { return this->playable; };
-    
+
 
      inline Hud& hud() { return this->_hud; };
Index: /branches/new_class_id/src/world_entities/power_ups/param_power_up.cc
===================================================================
--- /branches/new_class_id/src/world_entities/power_ups/param_power_up.cc	(revision 9704)
+++ /branches/new_class_id/src/world_entities/power_ups/param_power_up.cc	(revision 9705)
@@ -27,6 +27,7 @@
 
 
-
+#include "class_id.h"
 CREATE_FACTORY(ParamPowerUp, CL_PARAM_POWER_UP);
+NewObjectListDefinitionID(ParamPowerUp, CL_PARAM_POWER_UP);
 
 const char* ParamPowerUp::paramTypes[] = {
@@ -58,5 +59,5 @@
 void ParamPowerUp::init()
 {
-  this->setClassID(CL_PARAM_POWER_UP, "ParamPowerUp");
+  this->registerObject(this, ParamPowerUp::_objectList);
   this->value = 0;
   this->max_value = 0;
Index: /branches/new_class_id/src/world_entities/power_ups/param_power_up.h
===================================================================
--- /branches/new_class_id/src/world_entities/power_ups/param_power_up.h	(revision 9704)
+++ /branches/new_class_id/src/world_entities/power_ups/param_power_up.h	(revision 9705)
@@ -20,4 +20,5 @@
 
 class ParamPowerUp : public PowerUp {
+  NewObjectListDeclaration(ParamPowerUp);
 
 public:
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 9704)
+++ /branches/new_class_id/src/world_entities/power_ups/power_up.cc	(revision 9705)
@@ -25,8 +25,9 @@
 
 
+NewObjectListDefinition(PowerUp);
 
 PowerUp::PowerUp(float r, float g, float b)
 {
-  this->setClassID(CL_POWER_UP, "PowerUp");
+  this->registerObject(this, PowerUp::_objectList);
 
   this->respawnType = RESPAWN_TIME;
@@ -120,5 +121,5 @@
 void PowerUp::collidesWith (WorldEntity* entity, const Vector& location)
 {
-  if(this->collider != entity && entity->isA(CL_EXTENDABLE))
+  if(this->collider != entity && entity->isA(Extendable::classID()))
   {
     this->collider = entity;
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 9704)
+++ /branches/new_class_id/src/world_entities/power_ups/power_up.h	(revision 9705)
@@ -21,4 +21,5 @@
 
 class PowerUp : public WorldEntity {
+  NewObjectListDeclaration(PowerUp);
 
 public:
Index: /branches/new_class_id/src/world_entities/power_ups/weapon_power_up.cc
===================================================================
--- /branches/new_class_id/src/world_entities/power_ups/weapon_power_up.cc	(revision 9704)
+++ /branches/new_class_id/src/world_entities/power_ups/weapon_power_up.cc	(revision 9705)
@@ -27,6 +27,7 @@
 
 
-
+#include "class_id.h"
 CREATE_FACTORY(WeaponPowerUp, CL_WEAPON_POWER_UP);
+NewObjectListDefinitionID(WeaponPowerUp, CL_WEAPON_POWER_UP);
 
 WeaponPowerUp::WeaponPowerUp(const TiXmlElement* root) : PowerUp(1.0, 1.0, 0.0)
@@ -45,5 +46,5 @@
 void WeaponPowerUp::init()
 {
-  this->setClassID(CL_WEAPON_POWER_UP, "WeaponPowerUp");
+  this->registerObject(this, WeaponPowerUp::_objectList);
   this->loadPickupSound("sound/powerups/whats this2.wav");
 
Index: /branches/new_class_id/src/world_entities/power_ups/weapon_power_up.h
===================================================================
--- /branches/new_class_id/src/world_entities/power_ups/weapon_power_up.h	(revision 9704)
+++ /branches/new_class_id/src/world_entities/power_ups/weapon_power_up.h	(revision 9705)
@@ -14,5 +14,5 @@
 
 class WeaponPowerUp : public PowerUp {
-
+NewObjectListDeclaration(WeaponPowerUp);
 public:
   WeaponPowerUp(const TiXmlElement* root = NULL);
Index: /branches/new_class_id/src/world_entities/projectiles/projectile.cc
===================================================================
--- /branches/new_class_id/src/world_entities/projectiles/projectile.cc	(revision 9704)
+++ /branches/new_class_id/src/world_entities/projectiles/projectile.cc	(revision 9705)
@@ -26,4 +26,5 @@
 #include "debug.h"
 
+NewObjectListDefinition(Projectile);
 
 /**
@@ -32,5 +33,5 @@
 Projectile::Projectile () : WorldEntity()
 {
-  this->setClassID(CL_PROJECTILE, "Projectile");
+  this->registerObject(this, Projectile::_objectList);
 
   this->lifeCycle = 0.0;
Index: /branches/new_class_id/src/world_entities/projectiles/projectile.h
===================================================================
--- /branches/new_class_id/src/world_entities/projectiles/projectile.h	(revision 9704)
+++ /branches/new_class_id/src/world_entities/projectiles/projectile.h	(revision 9705)
@@ -18,4 +18,5 @@
 class Projectile : public WorldEntity
 {
+  NewObjectListDeclaration(Projectile);
   public:
     Projectile ();
Index: /branches/new_class_id/src/world_entities/spawning_point.cc
===================================================================
--- /branches/new_class_id/src/world_entities/spawning_point.cc	(revision 9704)
+++ /branches/new_class_id/src/world_entities/spawning_point.cc	(revision 9705)
@@ -21,6 +21,4 @@
 
 #include "world_entity.h"
-
-#include "class_list.h"
 
 #include "compiler.h"
Index: /branches/new_class_id/src/world_entities/spawning_point.h
===================================================================
--- /branches/new_class_id/src/world_entities/spawning_point.h	(revision 9704)
+++ /branches/new_class_id/src/world_entities/spawning_point.h	(revision 9705)
@@ -42,5 +42,5 @@
  */
 class SpawningPoint : public WorldEntity {
-
+  NewObjectListDeclaration(SpawningPoint);
   public:
     SpawningPoint(const TiXmlElement* root = NULL);
Index: /branches/new_class_id/src/world_entities/weapons/ammo_container.cc
===================================================================
--- /branches/new_class_id/src/world_entities/weapons/ammo_container.cc	(revision 9704)
+++ /branches/new_class_id/src/world_entities/weapons/ammo_container.cc	(revision 9705)
@@ -23,17 +23,17 @@
 
 
-
+NewObjectListDefinition(AmmoContainer);
 /**
  * standard constructor
  * @todo this constructor is not jet implemented - do it
 */
-AmmoContainer::AmmoContainer (ClassID projectileType, float maxEnergy)
+AmmoContainer::AmmoContainer (const NewClassID& projectileType, float maxEnergy)
 {
-   this->setClassID(CL_AMMO_CONTAINER, "AmmoContainer");
+  this->registerObject(this, AmmoContainer::_objectList);
 
-   this->projectileType = projectileType;
-   this->maxEnergy = maxEnergy;
+  this->projectileType = projectileType;
+  this->maxEnergy = maxEnergy;
 
-   this->energy = 0.0;
+  this->energy = 0.0;
 }
 
Index: /branches/new_class_id/src/world_entities/weapons/ammo_container.h
===================================================================
--- /branches/new_class_id/src/world_entities/weapons/ammo_container.h	(revision 9704)
+++ /branches/new_class_id/src/world_entities/weapons/ammo_container.h	(revision 9705)
@@ -17,7 +17,8 @@
 //! A class for Storing energy of Projectiles.
 class AmmoContainer : public BaseObject {
+  NewObjectListDeclaration(AmmoContainer);
 
  public:
-  AmmoContainer(NewClassID id, float maxEnergy = DEFAULT_MAX_ENERGY);
+  AmmoContainer(const NewClassID& id, float maxEnergy = DEFAULT_MAX_ENERGY);
   virtual ~AmmoContainer();
 
Index: /branches/new_class_id/src/world_entities/weapons/crosshair.cc
===================================================================
--- /branches/new_class_id/src/world_entities/weapons/crosshair.cc	(revision 9704)
+++ /branches/new_class_id/src/world_entities/weapons/crosshair.cc	(revision 9705)
@@ -26,5 +26,5 @@
 
 
-
+NewObjectListDefinition(Crosshair);
 /**
  * standart constructor
@@ -54,5 +54,5 @@
 void Crosshair::init()
 {
-  this->setClassID(CL_CROSSHAIR, "Crosshair");
+  this->registerObject(this, Crosshair::_objectList);
   this->setName("Crosshair");
 
Index: /branches/new_class_id/src/world_entities/weapons/crosshair.h
===================================================================
--- /branches/new_class_id/src/world_entities/weapons/crosshair.h	(revision 9704)
+++ /branches/new_class_id/src/world_entities/weapons/crosshair.h	(revision 9705)
@@ -22,5 +22,5 @@
 //! A class that enables the
 class Crosshair : public PNode, public Element2D, public EventListener {
-
+  NewObjectListDeclaration(Crosshair);
  public:
   Crosshair(const TiXmlElement* root = NULL);
Index: /branches/new_class_id/src/world_entities/weapons/weapon.cc
===================================================================
--- /branches/new_class_id/src/world_entities/weapons/weapon.cc	(revision 9704)
+++ /branches/new_class_id/src/world_entities/weapons/weapon.cc	(revision 9705)
@@ -25,5 +25,4 @@
 
 #include "util/loading/resource_manager.h"
-#include "class_list.h"
 #include "util/loading/factory.h"
 #include "util/loading/load_param.h"
@@ -36,5 +35,5 @@
 #include "elements/glgui_energywidget.h"
 
-
+NewObjectListDefinition(Weapon);
 
 ////////////////////
@@ -58,11 +57,11 @@
 {
   for (int i = 0; i < WS_STATE_COUNT; i++)
-    if (this->animation[i] && ClassList::exists(animation[i], CL_ANIMATION))  //!< @todo this should check animation3D
+    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 && ClassList::exists(this->soundBuffers[i], CL_SOUND_BUFFER))
+    if (this->soundBuffers[i] != NULL && OrxSound::SoundBuffer::objectList().exists(this->soundBuffers[i]))
       ResourceManager::getInstance()->unload(this->soundBuffers[i]);
 
-  if (ClassList::exists(this->soundSource, CL_SOUND_SOURCE))
+  if (OrxSound::SoundSource::objectList().exists(this->soundSource))
     delete this->soundSource;
 }
@@ -73,10 +72,10 @@
  * @returns the newly created Weapon.
  */
-Weapon* Weapon::createWeapon(ClassID weaponID)
+Weapon* Weapon::createWeapon(const NewClassID& weaponID)
 {
   BaseObject* createdObject = Factory::fabricate(weaponID);
   if (createdObject != NULL)
   {
-    if (createdObject->isA(CL_WEAPON))
+    if (createdObject->isA(Weapon::classID()))
       return dynamic_cast<Weapon*>(createdObject);
     else
@@ -89,4 +88,21 @@
 }
 
+Weapon* Weapon::createWeapon(const std::string& weaponName)
+{
+  BaseObject* createdObject = Factory::fabricate(weaponName);
+  if (createdObject != NULL)
+  {
+    if (createdObject->isA(Weapon::classID()))
+      return dynamic_cast<Weapon*>(createdObject);
+    else
+    {
+      delete createdObject;
+      return NULL;
+    }
+  }
+  return NULL;
+}
+
+
 /**
  * initializes the Weapon with ALL default values
@@ -96,5 +112,5 @@
 void Weapon::init()
 {
-  this->setClassID(CL_WEAPON, "Weapon");
+  this->registerObject(this, Weapon::_objectList);
   this->currentState     = WS_INACTIVE;            //< Normaly the Weapon is Inactive
   this->requestedAction  = WA_NONE;                //< No action is requested by default
@@ -115,5 +131,5 @@
   this->defaultTarget = NULL;                      //< Nothing is Targeted by default.
 
-  this->projectile = CL_NULL;                      //< No Projectile Class is Connected to this weapon
+  this->projectile = NullClass::classID();         //< No Projectile Class is Connected to this weapon
   this->projectileFactory = NULL;                  //< No Factory generating Projectiles is selected.
 
@@ -163,8 +179,6 @@
  * What it does, is telling the Weapon what Projectiles it can Emit.
  */
-void Weapon::setProjectileType(ClassID projectile)
-{
-  if (projectile == CL_NULL)
-    return;
+void Weapon::setProjectileType(const NewClassID& projectile)
+{
   this->projectile = projectile;
   this->projectileFactory = FastFactory::searchFastFactory(projectile);
Index: /branches/new_class_id/src/world_entities/weapons/weapon.h
===================================================================
--- /branches/new_class_id/src/world_entities/weapons/weapon.h	(revision 9704)
+++ /branches/new_class_id/src/world_entities/weapons/weapon.h	(revision 9705)
@@ -83,9 +83,12 @@
 class Weapon : public WorldEntity
 {
+  NewObjectListDeclaration(Weapon);
+
   public:
     // INITIALISATION //
     Weapon ();
     virtual ~Weapon ();
-    static Weapon* createWeapon(NewClassID weaponID);
+    static Weapon* createWeapon(const NewClassID& weaponID);
+    static Weapon* createWeapon(const std::string& weaponName);
 
     void init();
@@ -110,5 +113,5 @@
     /** @returns the Capabilities of this Weapon */
     inline long getCapability() const { return this->capability; };
-    void setProjectileType(NewClassID projectile);
+    void setProjectileType(const NewClassID& projectile);
     void setProjectileTypeC(const std::string& projectile);
     /** @returns The projectile's classID */
Index: /branches/new_class_id/src/world_entities/weapons/weapon_manager.cc
===================================================================
--- /branches/new_class_id/src/world_entities/weapons/weapon_manager.cc	(revision 9704)
+++ /branches/new_class_id/src/world_entities/weapons/weapon_manager.cc	(revision 9705)
@@ -22,5 +22,4 @@
 #include "weapon.h"
 #include "crosshair.h"
-#include "class_list.h"
 
 #include "playable.h"
@@ -32,4 +31,5 @@
 
 
+NewObjectListDefinition(WeaponManager);
 /**
  * @brief this initializes the weaponManager for a given nnumber of weapon slots
@@ -57,5 +57,5 @@
   // crosshair being a PNode it must not be deleted (this is because PNodes delete themselves.)
   // rennerc: crosshair seems not to delete itselve
-  if (ClassList::exists(this->crosshair, CL_CROSSHAIR))
+  if (Crosshair::objectList().exists(this->crosshair))
     delete this->crosshair;
 }
@@ -66,5 +66,5 @@
 void WeaponManager::init()
 {
-  this->setClassID(CL_WEAPON_MANAGER, "WeaponManager");
+  this->registerObject(this, WeaponManager::_objectList);
 
   this->parentNode = NULL;
@@ -298,5 +298,5 @@
   {
     this->parentNode->addChild(weapon);
-    if (this->parentEntity->isA(CL_PLAYABLE))
+    if (this->parentEntity->isA(Playable::classID()))
       dynamic_cast<Playable*>(this->parentEntity)->weaponConfigChanged();
     weapon->setDefaultTarget(this->crosshair);
@@ -311,5 +311,5 @@
  * @param ammo the ammo to increase
  */
-float WeaponManager::increaseAmmunition(ClassID projectileType, float ammo)
+float WeaponManager::increaseAmmunition(const NewClassID& projectileType, float ammo)
 {
   return this->getAmmoContainer(projectileType)->increaseEnergy(ammo);
@@ -324,5 +324,5 @@
 {
   assert (weapon != NULL);
-  return this->increaseAmmunition(weapon->getLeafClassID(), ammo);
+  return this->increaseAmmunition(weapon->getClassID(), ammo);
 
 }
@@ -468,5 +468,5 @@
       else
         this->currentSlotConfig[i].position.deactivateNode();
-      if (this->parentEntity != NULL && this->parentEntity->isA(CL_PLAYABLE))
+      if (this->parentEntity != NULL && this->parentEntity->isA(Playable::classID()))
         dynamic_cast<Playable*>(this->parentEntity)->weaponConfigChanged();
     }
@@ -523,5 +523,5 @@
 }
 
-CountPointer<AmmoContainer>& WeaponManager::getAmmoContainer(ClassID projectileType)
+CountPointer<AmmoContainer>& WeaponManager::getAmmoContainer(const NewClassID& projectileType)
 {
   for (unsigned int i = 0; i < this->ammo.size(); i++)
@@ -537,5 +537,5 @@
 {
   assert (weapon != NULL);
-  return (this->getAmmoContainer(weapon->getLeafClassID()));
+  return (this->getAmmoContainer(weapon->getClassID()));
 }
 
Index: /branches/new_class_id/src/world_entities/weapons/weapon_manager.h
===================================================================
--- /branches/new_class_id/src/world_entities/weapons/weapon_manager.h	(revision 9704)
+++ /branches/new_class_id/src/world_entities/weapons/weapon_manager.h	(revision 9705)
@@ -39,4 +39,5 @@
  */
 class WeaponManager : public BaseObject {
+  NewObjectListDeclaration(WeaponManager);
 
   //! an enumerator defining a Slot, where a Weapon can be stored inside.
@@ -89,5 +90,5 @@
     void changeWeaponConfig(int weaponConfig);
 
-    float increaseAmmunition(NewClassID projectileType, float ammo);
+    float increaseAmmunition(const NewClassID& projectileType, float ammo);
     float inclreaseAmmunition(const Weapon* weapon, float ammo);
 
@@ -106,5 +107,5 @@
  // private:
     int getNextFreeSlot(int configID, long capability = WTYPE_ALL);
-    CountPointer<AmmoContainer>& getAmmoContainer(NewClassID projectileType);
+    CountPointer<AmmoContainer>& getAmmoContainer(const NewClassID& projectileType);
     CountPointer<AmmoContainer>& getAmmoContainer(const Weapon* weapon);
 
Index: /branches/new_class_id/src/world_entities/world_entity.cc
===================================================================
--- /branches/new_class_id/src/world_entities/world_entity.cc	(revision 9704)
+++ /branches/new_class_id/src/world_entities/world_entity.cc	(revision 9705)
@@ -47,4 +47,6 @@
 SHELL_COMMAND(debugEntity, WorldEntity, debugWE);
 
+
+NewObjectListDefinition(WorldEntity);
 /**
  *  Loads the WordEntity-specific Part of any derived Class
@@ -56,5 +58,5 @@
     : Synchronizeable()
 {
-  this->setClassID(CL_WORLD_ENTITY, "WorldEntity");
+  this->registerObject(this, WorldEntity::_objectList);
 
   this->obbTree = NULL;
@@ -81,5 +83,5 @@
 
   // registering default reactions:
-  this->subscribeReaction(CREngine::CR_OBJECT_DAMAGE, /*CL_WORLD_ENTITY*/ CL_PROJECTILE);
+/// FIXME  this->subscribeReaction(CREngine::CR_OBJECT_DAMAGE, /*CL_WORLD_ENTITY*/ CL_PROJECTILE);
 
   this->toList(OM_NULL);
@@ -197,5 +199,5 @@
         PRINTF(1)("OBJ-File %s not found.\n", fileName.c_str());
 
-      if( modelNumber == 0 && !this->isA(CL_WEAPON))
+      if( modelNumber == 0 /* FIXME && !this->isA(CL_WEAPON) */)
         this->buildObbTree(obbTreeDepth);
     }
@@ -300,5 +302,5 @@
  *  @param target1 a filter target (classID)
  */
-void WorldEntity::subscribeReaction(CREngine::CRType type, long target1)
+void WorldEntity::subscribeReaction(CREngine::CRType type, const NewClassID& target1)
 {
   this->subscribeReaction(type);
@@ -314,5 +316,5 @@
  *  @param target1 a filter target (classID)
  */
-void WorldEntity::subscribeReaction(CREngine::CRType type, long target1, long target2)
+void WorldEntity::subscribeReaction(CREngine::CRType type, const NewClassID& target1, const NewClassID& target2)
 {
   this->subscribeReaction(type);
@@ -329,5 +331,5 @@
  *  @param target1 a filter target (classID)
  */
-void WorldEntity::subscribeReaction(CREngine::CRType type, long target1, long target2, long target3)
+void WorldEntity::subscribeReaction(CREngine::CRType type, const NewClassID& target1, const NewClassID& target2, const NewClassID& target3)
 {
   this->subscribeReaction(type);
@@ -345,5 +347,5 @@
  *  @param target1 a filter target (classID)
  */
-void WorldEntity::subscribeReaction(CREngine::CRType type, long target1, long target2, long target3, long target4)
+void WorldEntity::subscribeReaction(CREngine::CRType type, const NewClassID& target1, const NewClassID& target2, const NewClassID& target3, const NewClassID& target4)
 {
   this->subscribeReaction(type);
Index: /branches/new_class_id/src/world_entities/world_entity.h
===================================================================
--- /branches/new_class_id/src/world_entities/world_entity.h	(revision 9704)
+++ /branches/new_class_id/src/world_entities/world_entity.h	(revision 9705)
@@ -37,7 +37,9 @@
 
 
+
 //! Basis-class all interactive stuff in the world is derived from
 class WorldEntity : public PNode
 {
+  NewObjectListDeclaration(WorldEntity);
 public:
   WorldEntity();
@@ -49,5 +51,5 @@
   void loadModel2(const std::string& fileN, float scal = 1.0f){this->loadModel(fileN,scal,0,4);}
   void setModel(Model* model, unsigned int modelNumber = 0);
-  Model* getModel(unsigned int modelNumber = 0) const { return (this->models.size() > modelNumber)? this->models[modelNumber] : NULL; };
+Model* getModel(unsigned int modelNumber = 0) const { return (this->models.size() > modelNumber)? this->models[modelNumber] : NULL; };
 
   inline void loadMD2Texture(const std::string& fileName) { this->md2TextureFileName = fileName; }
@@ -73,5 +75,5 @@
 
 
-/** @returns a reference to the obb tree of this worldentity */
+  /** @returns a reference to the obb tree of this worldentity */
   inline BVTree* getOBBTree() const { return this->obbTree; };
   inline void setOBBTree(OBBTree* tree) { /*if( this->obbTree != NULL) delete this->obbTree;*/ this->obbTree = (BVTree*)tree; }
@@ -81,8 +83,8 @@
   /* --- Collision Reaction Block --- */
   void subscribeReaction(CREngine::CRType type);
-  void subscribeReaction(CREngine::CRType type, long target1);
-  void subscribeReaction(CREngine::CRType type, long target1, long target2);
-  void subscribeReaction(CREngine::CRType type, long target1, long target2, long target3);
-  void subscribeReaction(CREngine::CRType type, long target1, long target2, long target3, long target4);
+  void subscribeReaction(CREngine::CRType type, const NewClassID& target1);
+  void subscribeReaction(CREngine::CRType type, const NewClassID& target1, const NewClassID& target2);
+  void subscribeReaction(CREngine::CRType type, const NewClassID& target1, const NewClassID& target2, const NewClassID& target3);
+  void subscribeReaction(CREngine::CRType type, const NewClassID& target1, const NewClassID& target2, const NewClassID& target3, const NewClassID& target4);
 
   void unsubscribeReaction(CREngine::CRType type);
@@ -126,10 +128,10 @@
 
   void hide() { if( this->objectListNumber != OM_DEAD) this->lastObjectListNumber = this->objectListNumber; this->toList(OM_DEAD); }
-  void unhide() { if( this->objectListNumber != this->lastObjectListNumber) this->toList(this->lastObjectListNumber); }
+void unhide() { if( this->objectListNumber != this->lastObjectListNumber) this->toList(this->lastObjectListNumber); }
 
 
   /* --- Character Attribute Block --- */
   /** @returns the scaling of the model */
-  float getScaling(){return this->scaling;}
+float getScaling(){return this->scaling;}
   /** @returns the damage dealt by this world entity */
   float getDamage() const { return this->damage; }
@@ -216,5 +218,5 @@
   bool                    bOnGround;                       //!< true if this entity is standing on the ground
 
-  protected:
+protected:
   Vector                  velocity;                        //!< speed of the entity
 
