Index: orxonox/trunk/src/world_entities/player.cc
===================================================================
--- orxonox/trunk/src/world_entities/player.cc	(revision 4925)
+++ orxonox/trunk/src/world_entities/player.cc	(revision 4926)
@@ -105,5 +105,5 @@
 
 
-  this->weaponMan = new WeaponManager();
+  this->weaponMan = new WeaponManager(2);
 }
 
Index: orxonox/trunk/src/world_entities/weapons/weapon.cc
===================================================================
--- orxonox/trunk/src/world_entities/weapons/weapon.cc	(revision 4925)
+++ orxonox/trunk/src/world_entities/weapons/weapon.cc	(revision 4926)
@@ -77,5 +77,4 @@
     this->soundBuffers[i] = NULL;
 
-  this->requestedAction = WA_NONE;
   this->soundSource = new SoundSource(this);
   this->emissionPoint.setParent(this);
@@ -183,8 +182,7 @@
   {
     this->currentState = WS_ACTIVATING;
-    this->requestAction(WA_ACTIVATE);
-  }
-}
-
+    this->requestedAction = WA_ACTIVATE;
+  }
+}
 
 /**
@@ -227,5 +225,8 @@
 #endif
 
-  switch (this->requestedAction)
+  WeaponAction action = this->requestedAction;
+  this->requestedAction = WA_NONE;
+
+  switch (action)
   {
     case WA_SHOOT:
@@ -254,19 +255,15 @@
 bool Weapon::activateW()
 {
-  if (this->currentState == WS_INACTIVE)
+//  if (this->currentState == WS_INACTIVE)
   {
         // play Sound
     if (likely(this->soundBuffers[WA_ACTIVATE] != NULL))
       this->soundSource->play(this->soundBuffers[WA_ACTIVATE]);
-    if (likely(this->animation[WS_ACTIVATING] != NULL))
-      this->animation[WS_ACTIVATING]->replay();
         // activate
     PRINTF(4)("Activating the Weapon %s\n", this->getName());
     this->activate();
     // setting up for next action
-    this->currentState = WS_ACTIVATING;
-    this->stateDuration = this->times[WS_ACTIVATING] + this->stateDuration;
-  }
-  this->requestedAction = WA_NONE;
+    this->enterState(WS_ACTIVATING);
+  }
 }
 
@@ -284,13 +281,8 @@
     if (this->soundBuffers[WA_DEACTIVATE] != NULL)
       this->soundSource->play(this->soundBuffers[WA_DEACTIVATE]);
-    if (likely(this->animation[WS_DEACTIVATING] != NULL))
-      this->animation[WS_DEACTIVATING]->replay();
-        // deactivate
+    // deactivate
     this->deactivate();
-        // setting up for next action
-    this->currentState = WS_DEACTIVATING;
-    this->stateDuration = this->times[WS_DEACTIVATING] + this->stateDuration;
-  }
-  this->requestedAction = WA_NONE;
+    this->enterState(WS_DEACTIVATING);
+  }
 }
 
@@ -306,17 +298,12 @@
     if (this->soundBuffers[WA_CHARGE] != NULL)
       this->soundSource->play(this->soundBuffers[WA_CHARGE]);
-    if (likely(this->animation[WS_CHARGING] != NULL))
-      this->animation[WS_CHARGING]->replay();
 
         // charge
     this->charge();
         // setting up for the next state
-    this->requestedAction = WA_NONE;
-    this->currentState = WS_CHARGING;
-    this->stateDuration = this->times[WS_CHARGING] + this->stateDuration;
+    this->enterState(WS_CHARGING);
   }
   else // deactivate the Weapon if we do not have enough energy
   {
-    this->requestedAction = WA_NONE;
     this->requestAction(WA_RELOAD);
   }
@@ -336,17 +323,12 @@
     if (this->soundBuffers[WA_SHOOT] != NULL)
       this->soundSource->play(this->soundBuffers[WA_SHOOT]);
-    if (likely(this->animation[WS_SHOOTING] != NULL))
-      this->animation[WS_SHOOTING]->replay();
           // fire
     this->fire();
     this->energyLoaded -= this->minCharge;
           // setting up for the next state
-    this->stateDuration = this->times[WS_SHOOTING] + this->stateDuration;
-    this->currentState = WS_SHOOTING;
-    this->requestedAction = WA_NONE;
+    this->enterState(WS_SHOOTING);
   }
   else  // reload if we still have the charge
   {
-    this->requestedAction = WA_NONE;
     this->requestAction(WA_RELOAD);
   }
@@ -371,6 +353,4 @@
   if (this->soundBuffers[WA_RELOAD] != NULL)
     this->soundSource->play(this->soundBuffers[WA_RELOAD]);
-  if (likely(this->animation[WS_RELOADING] != NULL))
-    this->animation[WS_RELOADING]->replay();
 
   if (chargeSize > this->energy)
@@ -387,9 +367,20 @@
   }
   this->reload();
-
-  this->requestedAction = WA_NONE;
-  this->currentState = WS_RELOADING;
-  this->stateDuration = this->times[WS_RELOADING] + this->stateDuration;
-
+  this->enterState(WS_RELOADING);
+}
+
+
+/**
+ * enters the requested State, plays back animations updates the timing.
+ * @param state the state to enter.
+ */
+inline void Weapon::enterState(WeaponState state)
+{
+  // playing animation if availiable
+  if (likely(this->animation[state] != NULL))
+    this->animation[state]->replay();
+
+  this->stateDuration = this->times[state] + this->stateDuration;
+  this->currentState = state;
 }
 
Index: orxonox/trunk/src/world_entities/weapons/weapon.h
===================================================================
--- orxonox/trunk/src/world_entities/weapons/weapon.h	(revision 4925)
+++ orxonox/trunk/src/world_entities/weapons/weapon.h	(revision 4926)
@@ -155,4 +155,6 @@
     bool reloadW();
 
+    inline void enterState(WeaponState state);
+
 
   protected:
Index: orxonox/trunk/src/world_entities/weapons/weapon_manager.cc
===================================================================
--- orxonox/trunk/src/world_entities/weapons/weapon_manager.cc	(revision 4925)
+++ orxonox/trunk/src/world_entities/weapons/weapon_manager.cc	(revision 4926)
@@ -34,8 +34,8 @@
  * @param number of weapon slots of the model/ship <= 8 (limitied)
  */
-WeaponManager::WeaponManager(int nrOfSlots)
+WeaponManager::WeaponManager(int slotCount)
 {
   this->init();
-  this->nrOfSlots = nrOfSlots;
+  this->slotCount = slotCount;
 }
 
@@ -127,9 +127,9 @@
 /**
  * sets the number of Slots the WeaponManager has
- * @param nrOfSlots the number of slots
- */
-void WeaponManager::setSlotCount(int nrOfSlots)
-{
-  this->nrOfSlots = nrOfSlots;
+ * @param slotCount the number of slots
+ */
+void WeaponManager::setSlotCount(int slotCount)
+{
+  this->slotCount = slotCount;
 }
 
@@ -150,5 +150,5 @@
   {
     int freeSlot = this->getNextFreeSlot( configID);
-    if( freeSlot < 0 || freeSlot >= this->nrOfSlots)
+    if( freeSlot < 0 || freeSlot >= this->slotCount)
     {
       PRINTF(0)("There is no free slot in this WeaponConfig to dock this weapon at! Aborting\n");
@@ -262,5 +262,5 @@
   {
     w = this->configs[j].slots[i];
-    if( w != NULL)// && w->isVisible())
+    if( w != NULL && w->isVisible())
       w->draw();
   }
Index: orxonox/trunk/src/world_entities/weapons/weapon_manager.h
===================================================================
--- orxonox/trunk/src/world_entities/weapons/weapon_manager.h	(revision 4925)
+++ orxonox/trunk/src/world_entities/weapons/weapon_manager.h	(revision 4926)
@@ -76,5 +76,5 @@
 class WeaponManager : public BaseObject {
   public:
-    WeaponManager(int nrOfSlots = 2);
+    WeaponManager(int slotCount);
     WeaponManager(const TiXmlElement* root);
     ~WeaponManager();
@@ -84,5 +84,5 @@
     void loadWeapons(const TiXmlElement* root);
 
-    void setSlotCount(int nrOfSlots);
+    void setSlotCount(int slotCount);
 
     void addWeapon(Weapon* weapon, int configID = WM_CONFIG0, int slotID = WM_FREE_SLOT);
@@ -101,5 +101,5 @@
     tAnimation<Crosshair>*  crossHairSizeAnim;
 
-    int                     nrOfSlots;               //<! number of weapon slots a ship has
+    int                     slotCount;               //<! number of weapon slots a ship has
     int                     currConfID;              //<! the currently selected config
     weaponConfig            configs[4];              //<! a list of four configurations
