Index: /orxonox/trunk/src/world_entities/weapons/weapon.cc
===================================================================
--- /orxonox/trunk/src/world_entities/weapons/weapon.cc	(revision 4890)
+++ /orxonox/trunk/src/world_entities/weapons/weapon.cc	(revision 4891)
@@ -87,4 +87,9 @@
 
 
+/**
+ * assigns a Sound-file to an action
+ * @param action the action the sound should be assigned too
+ * @param soundFile the soundFile's relative position to the data-directory (will be looked for by the ResourceManager)
+ */
 void Weapon::setActionSound(WeaponAction action, const char* soundFile)
 {
@@ -147,7 +152,14 @@
 }
 
+/**
+ * executes an action, and with it starts a new State.
+ * @return true, if it worked, false otherwise
+ *
+ * This function checks, wheter the possibility of executing an action is valid,
+ * and does all the necessary stuff, to execute them. If an action does not succeed,
+ * it tries to go around it. (ex. shoot->noAmo->reload()->wait until shoot comes again)
+ */
 bool Weapon::execute()
 {
-  this->stateDuration = this->times[this->requestedAction] + this->stateDuration;
 
   PRINTF(4)("trying to execute action %s\n", actionToChar(this->requestedAction));
@@ -161,7 +173,11 @@
         if (this->minCharge <= this->energyLoaded)
         {
+          // playing Sound
           if (this->soundBuffers[WA_SHOOT] != NULL)
             this->soundSource->play(this->soundBuffers[WA_SHOOT]);
+          // fire
           this->fire();
+          // setting up for the next state
+          this->stateDuration = this->times[WA_SHOOT] + this->stateDuration;
           this->requestedAction = WA_NONE;
         }
@@ -176,8 +192,12 @@
       if ( this->currentState != WS_INACTIVE && this->energyLoaded >= this->minCharge)
       {
+        // playing Sound
         if (this->soundBuffers[WA_CHARGE] != NULL)
          this->soundSource->play(this->soundBuffers[WA_CHARGE]);
+        // charge
         this->charge();
+        // setting up for the next state
         this->requestedAction = WA_NONE;
+        this->stateDuration = this->times[WA_CHARGE] + this->stateDuration;
       }
       else // deactivate the Weapon if we do not have enough energy
@@ -190,9 +210,12 @@
       //if (this->currentState != WS_INACTIVE && this->energy + this->energyLoaded >= this->minCharge)
       {
+        // playing Sound
         if (this->soundBuffers[WA_RELOAD] != NULL)
           this->soundSource->play(this->soundBuffers[WA_RELOAD]);
-
+        // reload
         this->reload();
+        // setting up for next action
         this->requestedAction = WA_NONE;
+        this->stateDuration = this->times[WA_RELOAD] + this->stateDuration;
       }
       break;
@@ -200,9 +223,12 @@
       if (this->currentState != WS_INACTIVE)
       {
+        // play Sound
         if (this->soundBuffers[WA_DEACTIVATE] != NULL)
           this->soundSource->play(this->soundBuffers[WA_DEACTIVATE]);
-
+        // deactivate
         this->deactivate();
+        // setting up for next action
         this->requestedAction = WA_NONE;
+        this->stateDuration = this->times[WA_DEACTIVATE] + this->stateDuration;
       }
       break;
@@ -210,9 +236,12 @@
       if (this->currentState == WS_INACTIVE)
       {
+        // play Sound
         if (this->soundBuffers[WA_ACTIVATE] != NULL)
           this->soundSource->play(this->soundBuffers[WA_ACTIVATE]);
-
+        // activate
         this->activate();
+        // setting up for next action
         this->requestedAction = WA_NONE;
+        this->stateDuration = this->times[WA_ACTIVATE] + this->stateDuration;
       }
       break;
@@ -349,4 +378,24 @@
 }
 
+
+/**
+ * checks wether all the Weapons functions are valid, and if it is possible to go to action with it.
+ *
+ */
+bool Weapon::check() const
+{
+  bool retVal = true;
+
+  if (this->projectile == NULL)
+  {
+    PRINTF(2)("There was no projectile assigned to the Weapon.\n");
+    retVal = false;
+  }
+
+
+
+
+  return retVal;
+}
 
 /**
Index: /orxonox/trunk/src/world_entities/weapons/weapon.h
===================================================================
--- /orxonox/trunk/src/world_entities/weapons/weapon.h	(revision 4890)
+++ /orxonox/trunk/src/world_entities/weapons/weapon.h	(revision 4891)
@@ -115,4 +115,5 @@
     virtual void draw();
 
+    bool check() const;
     void debug() const;
 
@@ -132,4 +133,6 @@
     static WeaponState   charToState(const char* state);
     static const char*   stateToChar(WeaponState state);
+
+
   private:
     bool nextActionValid() const;
