Index: orxonox/branches/weaponSystem/src/world_entities/weapons/weapon.cc
===================================================================
--- orxonox/branches/weaponSystem/src/world_entities/weapons/weapon.cc	(revision 4876)
+++ orxonox/branches/weaponSystem/src/world_entities/weapons/weapon.cc	(revision 4878)
@@ -25,10 +25,11 @@
 
 /**
- *  standard constructor
-
-   creates a new weapon
+ * standard constructor
+ *
+ * creates a new weapon
 */
 Weapon::Weapon (PNode* parent, const Vector& coordinate, const Quaternion& direction)
 {
+  this->init();
   parent->addChild(this, PNODE_ALL);
   this->setRelCoor(coordinate);
@@ -36,7 +37,6 @@
 }
 
-
 /**
- *  standard deconstructor
+ * standard deconstructor
 */
 Weapon::~Weapon ()
@@ -50,50 +50,29 @@
 }
 
+void Weapon::init()
+{
+  this->currentState     = WS_INACTIVE;
+  this->stateTime        = 0.0;
+  for (int i = 0; i < WS_STATE_COUNT; i++)
+  {
+    this->times[i] = 0.0;
+    this->animation[i] = NULL;
+  }
+  for (int i = 0; i < WA_ACTION_COUNT; i++)
+    this->soundBuffers[i] = NULL;
+
+  this->weaponSource = NULL;
+  this->minCharge;
+  this->maxCharge;
+
+  this->active = false;
+  this->projectile = NULL;
+}
 
 /**
-  *  enables the weapon
-
-    a weapon can be enabled/disabled because of various reasons. if a weapon is
-    been enabled, it can interact in a world. elswhere it wont react to any
-    action.
-*/
-void Weapon::enable()
-{
-  this->enabled = true;
-}
-
-
-/**
-  *  disables the weapon
-
-    a weapon can be enabled/disabled because of various reasons. if a weapon is
-    been enabled, it can interact in a world. elswhere it wont react to any
-    action.
-*/
-void Weapon::disable()
-{
-  this->enabled = false;
-}
-
-
-/**
-  *  checks if the weapon is enabled
-  * @returns true if enabled
-
-    a weapon can be ebabled/disabled because of various reasons. if a weapon is
-    been enabled, it can interact in a world. elswhere it wont react to any
-    action.
-*/
-bool Weapon::isEnabled()
-{
-  return this->enabled;
-}
-
-
-/**
- *  sets a new projectile to the weapon
+ * sets a new projectile to the weapon
  * @param new projectile for this weapon
-
-   weapon an projectile are independent, so you can combine them as you want
+ *
+ * weapon an projectile are independent, so you can combine them as you want
 */
 void Weapon::setProjectile(Projectile* projectile)
@@ -104,8 +83,8 @@
 
 /**
- *  sets a new projectile to the weapon
+ * sets a new projectile to the weapon
  * @returns the current projectile of this weapon
-
-   weapon an projectile are independent, so you can combine them as you want
+ *
+ * weapon an projectile are independent, so you can combine them as you want
 */
 Projectile* Weapon::getProjectile()
@@ -116,9 +95,9 @@
 
 /**
- *  this activates the weapon
-
-   This is needed, since there can be more than one weapon on a ship. the
-   activation can be connected with an animation. for example the weapon is
-   been armed out.
+ * this activates the weapon
+ *
+ * This is needed, since there can be more than one weapon on a ship. the
+ * activation can be connected with an animation. for example the weapon is
+ * been armed out.
 */
 void Weapon::activate()
@@ -127,9 +106,9 @@
 
 /**
- *  this deactivates the weapon
-
-   This is needed, since there can be more than one weapon on a ship. the
-   activation can be connected with an animation. for example the weapon is
-   been armed out.
+ * this deactivates the weapon
+ *
+ * This is needed, since there can be more than one weapon on a ship. the
+ * activation can be connected with an animation. for example the weapon is
+ * been armed out.
 */
 void Weapon::deactivate()
@@ -137,22 +116,10 @@
 
 /**
- *  asks if the current weapon is active
- * @returns true if it the weapon is active
-*/
-bool Weapon::isActive()
-{}
-
-
-
-
-
-
-/**
- *  is called, when the weapon gets hit (=collide with something)
+ * is called, when the weapon gets hit (=collide with something)
  * @param from which entity it is been hit
  * @param where it is been hit
-
-   this may not be used, since it would make the game relay complicated when one
-   can destroy the weapons of enemies or vice versa.
+ *
+ * this may not be used, since it would make the game relay complicated when one
+ * can destroy the weapons of enemies or vice versa.
 */
 void Weapon::hit (WorldEntity* entity, const Vector& position)
@@ -162,7 +129,7 @@
 /**
  *  is called, when the weapon is destroyed
-
-   this is in conjunction with the hit function, so when a weapon is able to get
-   hit, it can also be destoryed.
+ *
+ * this is in conjunction with the hit function, so when a weapon is able to get
+ * hit, it can also be destoryed.
 */
 void Weapon::destroy ()
