Index: branches/vs-enhencements/src/lib/collision_reaction/cr_defs.h
===================================================================
--- branches/vs-enhencements/src/lib/collision_reaction/cr_defs.h	(revision 10676)
+++ branches/vs-enhencements/src/lib/collision_reaction/cr_defs.h	(revision 10678)
@@ -25,5 +25,5 @@
 
 //!< the maximal number of bounding volumes collision events per frame
-#define CR_MAX_COLLISION_EVENTS   3000
+#define CR_MAX_COLLISION_EVENTS   5000
 
 
Index: branches/vs-enhencements/src/lib/coord/p_node.cc
===================================================================
--- branches/vs-enhencements/src/lib/coord/p_node.cc	(revision 10676)
+++ branches/vs-enhencements/src/lib/coord/p_node.cc	(revision 10678)
@@ -143,4 +143,7 @@
 void PNode::loadParams(const TiXmlElement* root)
 {
+  if (!root)
+    return;
+
   BaseObject::loadParams(root);
 
Index: branches/vs-enhencements/src/world_entities/npcs/npc.cc
===================================================================
--- branches/vs-enhencements/src/world_entities/npcs/npc.cc	(revision 10676)
+++ branches/vs-enhencements/src/world_entities/npcs/npc.cc	(revision 10678)
@@ -417,6 +417,4 @@
   }
 
-
-
   this->weaponMan.tick(dt);
   if (this->bFire)
Index: branches/vs-enhencements/src/world_entities/playable.cc
===================================================================
--- branches/vs-enhencements/src/world_entities/playable.cc	(revision 10676)
+++ branches/vs-enhencements/src/world_entities/playable.cc	(revision 10678)
@@ -93,4 +93,6 @@
 void Playable::loadParams(const TiXmlElement* root)
 {
+  if (!root)
+    return;
   WorldEntity::loadParams(root);
 
Index: branches/vs-enhencements/src/world_entities/space_ships/space_ship.cc
===================================================================
--- branches/vs-enhencements/src/world_entities/space_ships/space_ship.cc	(revision 10676)
+++ branches/vs-enhencements/src/world_entities/space_ships/space_ship.cc	(revision 10678)
@@ -165,22 +165,22 @@
   this->secWeaponMan.setSlotCount(6);
 
-  this->weaponMan.createWeaponSlot(0, 3.270, 1.028, .155, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
-  this->weaponMan.createWeaponSlot(1, 3.270, 1.028, -.155, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
-  this->weaponMan.createWeaponSlot(2, 4.385, .063, .876, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
-  this->weaponMan.createWeaponSlot(3, 4.385, -.063, -.876, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
-  this->weaponMan.createWeaponSlot(4, 1.635, -.612, 2.691, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
-  this->weaponMan.createWeaponSlot(5, 1.536, -.612, -2.691, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
-  this->weaponMan.createWeaponSlot(6, 1.536, -.612, 3.254, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
-  this->weaponMan.createWeaponSlot(7, 1.536, -.612, -3.254, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
-
-
-  this->weaponMan.addWeaponToSlot(0, 0, "RFCannon");
-  this->weaponMan.addWeaponToSlot(0, 1, "RFCannon");
-  this->weaponMan.addWeaponToSlot(0, 2, "RFCannon");
-  this->weaponMan.addWeaponToSlot(0, 3, "RFCannon");
-  this->weaponMan.addWeaponToSlot(1, 0, "RFCannon");
-  this->weaponMan.addWeaponToSlot(1, 1, "RFCannon");
-  this->weaponMan.addWeaponToSlot(1, 2, "RFCannon");
-  this->weaponMan.addWeaponToSlot(1, 3, "RFCannon");
+//   this->weaponMan.createWeaponSlot(0, 3.270, 1.028, .155, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+//   this->weaponMan.createWeaponSlot(1, 3.270, 1.028, -.155, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+//   this->weaponMan.createWeaponSlot(2, 4.385, .063, .876, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+//   this->weaponMan.createWeaponSlot(3, 4.385, -.063, -.876, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+//   this->weaponMan.createWeaponSlot(4, 1.635, -.612, 2.691, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+//   this->weaponMan.createWeaponSlot(5, 1.536, -.612, -2.691, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+//   this->weaponMan.createWeaponSlot(6, 1.536, -.612, 3.254, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+//   this->weaponMan.createWeaponSlot(7, 1.536, -.612, -3.254, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+
+
+//   this->weaponMan.addWeaponToSlot(0, 0, "RFCannon");
+//   this->weaponMan.addWeaponToSlot(0, 1, "RFCannon");
+//   this->weaponMan.addWeaponToSlot(0, 2, "RFCannon");
+//   this->weaponMan.addWeaponToSlot(0, 3, "RFCannon");
+//   this->weaponMan.addWeaponToSlot(1, 0, "RFCannon");
+//   this->weaponMan.addWeaponToSlot(1, 1, "RFCannon");
+//   this->weaponMan.addWeaponToSlot(1, 2, "RFCannon");
+//   this->weaponMan.addWeaponToSlot(1, 3, "RFCannon");
 
   this->weaponMan.addWeaponToSlot(0, 4, "NadionLaser");
@@ -452,23 +452,23 @@
 {
 
-//   if( !this->bInit)
-//   {
-//     // now get slots from the mount points
-//     std::map<int, MountPoint*>::iterator it = this->mountPointMap.begin();
-//     for( ;it != this->mountPointMap.end(); it++)
-//     {
-//       WeaponSlot* ws = dynamic_cast<WeaponSlot*>((*it).second->getMount());
-//       if( ws != NULL && ws->isA(WeaponSlot::staticClassID()))
-//       {
-//         int slot = ws->getWeaponSlot();
-// //         int side = ws->getWeaponSide(); //FIXME / REMOVE: is not used// HACK needed for some weapons (left/right)
-//         this->getWeaponManager().setSlotPosition(slot, (*it).second->getCenter());
-//         this->getWeaponManager().setSlotDirection(slot, ws->getRelDir());
-// //         PRINTF(0)("setting slot %i\n", slot);
-// //         (*it).second->getCenter().debug();
-//       }
-//     }
-//   this->bInit = true;
-//   }
+  if( !this->bInit)
+  {
+    // now get slots from the mount points
+    std::map<int, MountPoint*>::iterator it = this->mountPointMap.begin();
+    for( ;it != this->mountPointMap.end(); it++)
+    {
+      WeaponSlot* ws = dynamic_cast<WeaponSlot*>((*it).second->getMount());
+      if( ws != NULL && ws->isA(WeaponSlot::staticClassID()))
+      {
+        int slot = ws->getWeaponSlot();
+//         int side = ws->getWeaponSide(); //FIXME / REMOVE: is not used// HACK needed for some weapons (left/right)
+        this->getWeaponManager().setSlotPosition(slot, (*it).second->getCenter());
+        this->getWeaponManager().setSlotDirection(slot, ws->getRelDir());
+//         PRINTF(0)("setting slot %i\n", slot);
+//         (*it).second->getCenter().debug();
+      }
+    }
+  this->bInit = true;
+  }
 
   // Playable::tick(time);
Index: branches/vs-enhencements/src/world_entities/weapons/weapon_manager.cc
===================================================================
--- branches/vs-enhencements/src/world_entities/weapons/weapon_manager.cc	(revision 10676)
+++ branches/vs-enhencements/src/world_entities/weapons/weapon_manager.cc	(revision 10678)
@@ -100,6 +100,6 @@
   }
 
-  for (int i = 0; i < WM_MAX_LOADED_WEAPONS; i++)
-    this->availiableWeapons[i] = NULL;
+//   for (int i = 0; i < WM_MAX_LOADED_WEAPONS; i++)
+//     this->availiableWeapons[i] = NULL;
 
 
@@ -287,27 +287,27 @@
   }
 
-//   if (configID > 0 && slotID > 0 && this->configs[configID][slotID] != NULL)
-//   {
-//     PRINTF(3)("Weapon-slot %d/%d of %s already poulated, remove weapon (%s::%s) first\n", configID, slotID, this->getCName(), weapon->getClassCName(), weapon->getCName());
-//     return false;
-//   }
-
-//   if (slotID <= -1) // WM_FREE_SLOT
-//   {
-//     slotID = this->getNextFreeSlot(configID, weapon->getCapability());
-//     if( slotID < 0 || slotID >= this->slotCount)
-//     {
-//       PRINTF(1)("There is no free slot in this WeaponConfig to dock this weapon at! Aborting\n");
-//       return false;
-//     }
-//   }
-
-//   if (!(this->slotConfigs[slotID]->getCapability() & weapon->getCapability() & WTYPE_ALLKINDS) &&
-//       this->slotConfigs[slotID]->getCapability() & weapon->getCapability() & WTYPE_ALLDIRS)
-//   {
-//     PRINTF(2)("Unable to add Weapon with wrong capatibility to Slot %d (W:%d M:%d)\n",
-//               slotID, weapon->getCapability(), this->slotConfigs[slotID]->getCapability());
-//     return false;
-//   }
+  if (configID > 0 && slotID > 0 && this->slotConfigs[slotID]->getWeapon(configID) != NULL)
+  {
+    PRINTF(3)("Weapon-slot %d/%d of %s already poulated, remove weapon (%s::%s) first\n", configID, slotID, this->getCName(), weapon->getClassCName(), weapon->getCName());
+    return false;
+  }
+
+  if (slotID <= -1) // WM_FREE_SLOT
+  {
+    slotID = this->getNextFreeSlot(configID, weapon->getCapability());
+    if( slotID < 0 || slotID >= this->slotCount)
+    {
+      PRINTF(1)("There is no free slot in this WeaponConfig to dock this weapon at! Aborting\n");
+      return false;
+    }
+  }
+
+  if (!(this->slotConfigs[slotID]->getCapability() & weapon->getCapability() & WTYPE_ALLKINDS) &&
+      this->slotConfigs[slotID]->getCapability() & weapon->getCapability() & WTYPE_ALLDIRS)
+  {
+    PRINTF(2)("Unable to add Weapon with wrong capatibility to Slot %d (W:%d M:%d)\n",
+              slotID, weapon->getCapability(), this->slotConfigs[slotID]->getCapability());
+    return false;
+  }
 
   //! @todo check if the weapon is already assigned to another config in another slot
@@ -508,5 +508,5 @@
         {
           tickWeapon->toList(OM_NULL);
-          this->slotConfigs[i]->setCurrentWeapon(NULL);
+          this->slotConfigs[i]->setCurrentWeapon(-1);
         }
       }
@@ -530,5 +530,5 @@
     }
     else if (unlikely(tickWeapon != NULL && tickWeapon->getCurrentState() == WS_DEACTIVATING))
-      this->slotConfigs[i]->setCurrentWeapon(NULL);
+      this->slotConfigs[i]->setCurrentWeapon(-1);
   }
 }
Index: branches/vs-enhencements/src/world_entities/weapons/weapon_manager.h
===================================================================
--- branches/vs-enhencements/src/world_entities/weapons/weapon_manager.h	(revision 10676)
+++ branches/vs-enhencements/src/world_entities/weapons/weapon_manager.h	(revision 10678)
@@ -125,5 +125,5 @@
 //     WeaponSlot*             currentSlotConfig[WM_MAX_SLOTS];          //!< The currentConfigureation.
     WeaponSlot*             slotConfigs[WM_MAX_SLOTS];
-    Weapon*                 availiableWeapons[WM_MAX_LOADED_WEAPONS]; //!< The availiable Weapons of this WeaponSlot
+//     Weapon*                 availiableWeapons[WM_MAX_LOADED_WEAPONS]; //!< The availiable Weapons of this WeaponSlot
 
     bool                    weaponChange;
Index: branches/vs-enhencements/src/world_entities/weapons/weapon_slot.h
===================================================================
--- branches/vs-enhencements/src/world_entities/weapons/weapon_slot.h	(revision 10676)
+++ branches/vs-enhencements/src/world_entities/weapons/weapon_slot.h	(revision 10678)
@@ -32,8 +32,8 @@
 
   inline Weapon* getCurrentWeapon() { return this->currentWeapon; }
-  inline void setCurrentWeapon(int config) { this->currentWeapon = this->configs[config]; }
+  inline void setCurrentWeapon(int config) { config == -1 ? this->currentWeapon = NULL: this->currentWeapon = this->configs[config]; }
 
   inline Weapon* getNextWeapon() { return this->nextWeapon; }
-  inline void setNextWeapon(int config) { if (config == -1) this->nextWeapon = NULL; else this->nextWeapon = configs[config]; }
+  inline void setNextWeapon(int config) { config == -1 ? this->nextWeapon = NULL : this->nextWeapon = configs[config]; }
 
   inline void setNextToCurrent() {this->currentWeapon = this->nextWeapon; };
Index: branches/vs-enhencements/src/world_entities/world_entity.cc
===================================================================
--- branches/vs-enhencements/src/world_entities/world_entity.cc	(revision 10676)
+++ branches/vs-enhencements/src/world_entities/world_entity.cc	(revision 10678)
@@ -151,4 +151,6 @@
 void WorldEntity::loadParams(const TiXmlElement* root)
 {
+  if (!root)
+    return;
   // Do the PNode loading stuff
   PNode::loadParams(root);
