Index: code/branches/main_reto_vs05/src/barrel_gun.cc
===================================================================
--- code/branches/main_reto_vs05/src/barrel_gun.cc	(revision 169)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *
- *
- *   License notice:
- *
- *   This program is free software: you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation, either version 3 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#include "OgreSceneManager.h"
-
-#include "barrel_gun.h"
-
-
-namespace orxonox {
-  using namespace Ogre;
-
-  BarrelGun::BarrelGun(SceneManager *sceneMgr) : sceneMgr_(sceneMgr)
-  {
-  	
-  }
-
-
-  BarrelGun::~BarrelGun()
-  {
-  }
-
-}
Index: code/branches/main_reto_vs05/src/barrel_gun.h
===================================================================
--- code/branches/main_reto_vs05/src/barrel_gun.h	(revision 169)
+++ 	(revision )
@@ -1,57 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *
- *
- *   License notice:
- *
- *   This program is free software: you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation, either version 3 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-
-#ifndef BARREL_GUN_H
-#define BARREL_GUN_H
-
-#include "OgrePrerequisites.h"
-
-#include "orxonox_prerequisites.h"
-
-
-namespace orxonox {
-
-  class BarrelGun
-  {
-  public:
-    BarrelGun(Ogre::SceneManager*);
-	  virtual ~BarrelGun();
-
-  protected:
-
-  public:
-    Ogre::SceneManager *sceneMgr_;
-	  Ogre::Entity *weaponEntity_;
-
-  protected:
-
-  };
-
-}
-
-#endif /* BARREL_GUN_H */
Index: code/branches/main_reto_vs05/src/bullet_manager.cc
===================================================================
--- code/branches/main_reto_vs05/src/bullet_manager.cc	(revision 177)
+++ code/branches/main_reto_vs05/src/bullet_manager.cc	(revision 177)
@@ -0,0 +1,88 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OgreSceneManager.h"
+
+#include "bullet_manager.h"
+#include "bullet.h"
+
+
+namespace orxonox {
+  using namespace Ogre;
+
+  BulletManager::BulletManager(SceneManager *sceneMgr) : sceneMgr_(sceneMgr),
+        bulletsIndex_(0), bulletsSize_(10)
+  {
+    bullets_ = new Bullet*[10];
+  }
+
+
+  BulletManager::~BulletManager()
+  {
+    // clean up the bullet list
+    if (bullets_)
+    {
+      for (int i = 0; i < bulletsIndex_; i++)
+        delete bullets_[i];
+      delete bullets_;
+    }
+  }
+
+
+  void BulletManager::addBullet(Bullet *bullet)
+  {
+    // resize array if neccessary (double the size then)
+    if (bulletsIndex_ >= bulletsSize_)
+    {
+      // redimension the array
+      Bullet **tempArray = new Bullet*[2*bulletsSize_];
+      for (int i = 0; i < bulletsSize_; i++)
+        tempArray[i] = bullets_[i];
+      bulletsSize_ *= 2;
+      delete bullets_;
+      bullets_ = tempArray;
+    }
+
+    // add the bullet to the list
+    bullets_[bulletsIndex_++] = bullet;
+  }
+
+
+  bool BulletManager::tick(unsigned long time, Real deltaTime)
+  {
+    // update the bullet positions
+    for (int i = 0; i < bulletsIndex_; i++)
+    {
+      bullets_[i]->node_->translate(bullets_[i]->speed_*deltaTime);
+      bullets_[i]->node_->yaw(Degree(deltaTime*100));
+      bullets_[i]->node_->roll(Degree(deltaTime*300));
+    }
+
+    return true;
+  }
+
+}
Index: code/branches/main_reto_vs05/src/bullet_manager.h
===================================================================
--- code/branches/main_reto_vs05/src/bullet_manager.h	(revision 177)
+++ code/branches/main_reto_vs05/src/bullet_manager.h	(revision 177)
@@ -0,0 +1,64 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+#ifndef BULLET_MANAGER_H
+#define BULLET_MANAGER_H
+
+#include "OgrePrerequisites.h"
+
+#include "orxonox_prerequisites.h"
+
+
+namespace orxonox {
+
+  class BulletManager
+  {
+  public:
+    BulletManager(Ogre::SceneManager*);
+	  virtual ~BulletManager();
+
+    void addBullet(Bullet*);
+
+    bool tick(unsigned long, Ogre::Real);
+
+  protected:
+
+  public:
+    Ogre::SceneManager *sceneMgr_;
+
+  protected:
+    // Bullet array
+	  Bullet **bullets_;
+	  int bulletsSize_;
+	  int bulletsIndex_;
+
+  };
+
+}
+
+#endif /* BULLET_MANAGER_H */
Index: code/branches/main_reto_vs05/src/orxonox_prerequisites.h
===================================================================
--- code/branches/main_reto_vs05/src/orxonox_prerequisites.h	(revision 169)
+++ code/branches/main_reto_vs05/src/orxonox_prerequisites.h	(revision 177)
@@ -34,4 +34,5 @@
   class AmmunitionDump;
   class Bullet;
+  class BulletManager;
   class CameraManager;
   class OgreControl;
Index: code/branches/main_reto_vs05/src/orxonox_ship.cc
===================================================================
--- code/branches/main_reto_vs05/src/orxonox_ship.cc	(revision 169)
+++ code/branches/main_reto_vs05/src/orxonox_ship.cc	(revision 177)
@@ -33,4 +33,5 @@
 
 #include "bullet.h"
+#include "bullet_manager.h"
 
 #include "orxonox_ship.h"
@@ -62,8 +63,9 @@
   * @param mNode The scene node which the ship will be attached to later.
   */
-  OrxonoxShip::OrxonoxShip(SceneManager *sceneMgr, SceneNode *node)
+  OrxonoxShip::OrxonoxShip(SceneManager *sceneMgr, SceneNode *node,
+        BulletManager *bulletManager)
 	      : sceneMgr_(sceneMgr), rootNode_(node), currentSpeed_(Vector3(0, 0, 0)),
         baseThrust_(1000), currentThrust_(Vector3::ZERO),
-        objectCounter_(0), bulletSpeed_(400)
+        objectCounter_(0), bulletManager_(bulletManager)//, bulletSpeed_(400)
   {
   }
@@ -76,4 +78,6 @@
   OrxonoxShip::~OrxonoxShip()
   {
+    if (mainWeapon_)
+      delete mainWeapon_;
   }
 
@@ -101,6 +105,9 @@
 
     // initialise weapon(s)
-    SceneNode *mainWeaponNode = rootNode_->createChildSceneNode("mainWeaponNode");
-    mainWeapon_ = new WeaponManager(sceneMgr_, mainWeaponNode, 1);
+    SceneNode *mainWeaponNode = rootNode_
+          ->createChildSceneNode("mainWeaponNode");
+    mainWeapon_ = new WeaponManager(sceneMgr_, mainWeaponNode,
+          bulletManager_, 1);
+    mainWeapon_->addWeapon("Barrel Gun");
 
 	  return true;
@@ -110,10 +117,9 @@
   /**
   * Gets the ship to accelerate in the current direction.
-  * The value should be between 0 and 1, with one beeing full thrust and 0 none.
+  * The value should be between 0 and 1, with one beeing full thrust and 0 none
   * @param value Acceleration between 0 and 1
   */
   void OrxonoxShip::setMainThrust(const Real value)
   {
-	  //currentThrust_ = value * baseThrust_;
     currentThrust_.z = value * baseThrust_;
   }
@@ -122,10 +128,9 @@
   /**
   * Gets the ship to accelerate sideways regarding the current direction.
-  * The value should be between 0 and 1, with one beeing full thrust and 0 none.
+  * The value should be between 0 and 1, with one beeing full thrust and 0 none
   * @param value Acceleration between 0 and 1
   */
   void OrxonoxShip::setSideThrust(const Real value)
   {
-	  //currentSideThrust_ = value * baseThrust_;
     currentThrust_.x = value * baseThrust_;
   }
@@ -134,10 +139,9 @@
   /**
   * Gets the ship to accelerate up and down.
-  * The value should be between 0 and 1, with one beeing full thrust and 0 none.
+  * The value should be between 0 and 1, with one beeing full thrust and 0 none
   * @param value Acceleration between 0 and 1
   */
   void OrxonoxShip::setYThrust(const Real value)
   {
-    //currentYThrust_ = value * baseThrust_;
     currentThrust_.y = value * baseThrust_;
   }
@@ -189,8 +193,8 @@
   * @return Bullet containing speed and entity.
   */
-  Bullet* OrxonoxShip::fire()
+  void OrxonoxShip::fire()
   {
 	  // TODO: Names must be unique!
-	  SceneNode *temp = rootNode_->getParentSceneNode()->createChildSceneNode(
+	  /*SceneNode *temp = rootNode_->getParentSceneNode()->createChildSceneNode(
           "BulletNode" + StringConverter::toString(objectCounter_));
 	  temp->setOrientation(rootNode_->getOrientation());
@@ -201,5 +205,7 @@
           + StringConverter::toString(objectCounter_++), "Barrel.mesh"), currentSpeed_
           + (rootNode_->getOrientation() * Vector3(0, 0, -1)).normalisedCopy()
-          * bulletSpeed_);
+          * bulletSpeed_);*/
+
+    mainWeapon_->primaryFireRequest();
   }
 
@@ -214,9 +220,9 @@
   bool OrxonoxShip::tick(unsigned long time, Real deltaTime)
   {
+    mainWeapon_->tick(time, deltaTime);
+
     Quaternion quad = rootNode_->getOrientation();
     quad.normalise();
     currentSpeed_ += quad * (Vector3(-1, -1, -1) * currentThrust_) * deltaTime;
-    //currentSpeed_ += quad * Vector3(0, 0, -1) * currentThrust_ * deltaTime;
-	  //currentSpeed_ += quad * Vector3(-1, 0,  0) * currentSideThrust_ * deltaTime;
 
 	  rootNode_->translate(currentSpeed_ * deltaTime);
Index: code/branches/main_reto_vs05/src/orxonox_ship.h
===================================================================
--- code/branches/main_reto_vs05/src/orxonox_ship.h	(revision 169)
+++ code/branches/main_reto_vs05/src/orxonox_ship.h	(revision 177)
@@ -40,5 +40,5 @@
   {
   public:
-	  OrxonoxShip(Ogre::SceneManager*, Ogre::SceneNode*);
+	  OrxonoxShip(Ogre::SceneManager*, Ogre::SceneNode*, BulletManager*);
 	  virtual ~OrxonoxShip();
 
@@ -54,5 +54,5 @@
     Ogre::Vector3 getSpeed();
 
-	  Bullet* fire();
+	  void fire();
 
 	  bool tick(unsigned long, Ogre::Real);
@@ -69,5 +69,7 @@
     Ogre::Real baseThrust_;
 	  int objectCounter_;
-	  Ogre::Vector3 bulletSpeed_;
+
+    BulletManager *bulletManager_;
+	  //Ogre::Vector3 bulletSpeed_;
 
     WeaponManager *mainWeapon_;
Index: code/branches/main_reto_vs05/src/run_manager.cc
===================================================================
--- code/branches/main_reto_vs05/src/run_manager.cc	(revision 169)
+++ code/branches/main_reto_vs05/src/run_manager.cc	(revision 177)
@@ -52,5 +52,7 @@
 #include "orxonox_ship.h"
 #include "bullet.h"
+#include "bullet_manager.h"
 #include "camera_manager.h"
+#include "weapon_manager.h"
 
 #include "run_manager.h"
@@ -97,4 +99,17 @@
     // background scene (world objects, skybox, lights, etc.)
     backgroundScene_ = new OrxonoxScene(sceneMgr_);
+
+
+    // BULLET LIST FOR THE TEST APPLICATION
+
+    // create a bullet manager
+    bulletManager_ = new BulletManager(sceneMgr_);
+    WeaponManager::loadWeapons();
+
+    // TODO: Use STL to make life easier. But it works this way too..
+    /*bullets_ = new Bullet*[10];
+    bulletsIndex_ = 0;
+    bulletsSize_ = 10;*/
+
 
     // PLAYER SPACESHIP
@@ -114,5 +129,5 @@
     // Construct a new spaceship and give it the node
     playerShip_ = new OrxonoxShip(sceneMgr_, sceneMgr_->getRootSceneNode()
-      ->createChildSceneNode("ShipNode", Vector3(20, 20, 20)));
+      ->createChildSceneNode("ShipNode", Vector3(20, 20, 20)), bulletManager_);
 
 
@@ -140,11 +155,4 @@
 
     
-    // BULLET LIST FOR THE TEST APPLICATION
-
-    // TODO: Use STL to make life easier. But it works this way too..
-    bullets_ = new Bullet*[10];
-    bulletsIndex_ = 0;
-    bulletsSize_ = 10;
-
 
     // HUMAN INTERFACE
@@ -205,9 +213,13 @@
     if (playerShip_)
       delete playerShip_;
+    if (bulletManager_)
+      delete bulletManager_;
+
+    WeaponManager::destroyWeapons();
 
     // clean up the bullet list
-    for (int i = 0; i < bulletsIndex_; i++)
+    /*for (int i = 0; i < bulletsIndex_; i++)
       delete bullets_[i];
-    delete bullets_;
+    delete bullets_;*/
   }
 
@@ -239,10 +251,12 @@
 
     // update the bullet positions
-    for (int i = 0; i < bulletsIndex_; i++)
+    bulletManager_->tick(time, deltaTime);
+
+    /*for (int i = 0; i < bulletsIndex_; i++)
     {
       bullets_[i]->node_->translate(bullets_[i]->speed_*deltaTime);
       bullets_[i]->node_->yaw(Degree(deltaTime*100));
       bullets_[i]->node_->roll(Degree(deltaTime*300));
-    }
+    }*/
 
     // HUMAN INTERFACE
@@ -447,7 +461,9 @@
       // Prevent continuous fire for the moment.
       leftButtonDown_ = true;
+
+      playerShip_->fire();
       
       // let ship fire one shot with its only weapon (Barrels..)
-      Bullet *tempBullet = playerShip_->fire();
+      /*Bullet *tempBullet = playerShip_->fire();
 
       // resize array if neccessary (double the size then)
@@ -464,5 +480,5 @@
 
       // add the bullet to the list
-      bullets_[bulletsIndex_++] = tempBullet;
+      bullets_[bulletsIndex_++] = tempBullet;*/
 
     }
Index: code/branches/main_reto_vs05/src/run_manager.h
===================================================================
--- code/branches/main_reto_vs05/src/run_manager.h	(revision 169)
+++ code/branches/main_reto_vs05/src/run_manager.h	(revision 177)
@@ -109,7 +109,8 @@
 
     // Bullet array
-	  Bullet **bullets_;
+	  /*Bullet **bullets_;
 	  int bulletsSize_;
-	  int bulletsIndex_;
+	  int bulletsIndex_;*/
+    BulletManager *bulletManager_;
 
 	  // previously elapsed render time
Index: code/branches/main_reto_vs05/src/weapon.h
===================================================================
--- code/branches/main_reto_vs05/src/weapon.h	(revision 169)
+++ code/branches/main_reto_vs05/src/weapon.h	(revision 177)
@@ -30,4 +30,5 @@
 #define WEAPON_H
 
+#include "OgrePrerequisites.h"
 #include "OgreString.h"
 
@@ -39,6 +40,9 @@
   {
   public:
-    Weapon(const Ogre::String &name, int firePower, int firingRate)
-          : name_(name), firePower_(firePower), firingRate_(firingRate) { }
+    Weapon(const Ogre::String &name, int firePower, int firingRate,
+      Ogre::Real bulletSpeed)
+          : name_(name), firePower_(firePower), firingRate_(firingRate),
+          bulletSpeed_(bulletSpeed) { }
+
     virtual ~Weapon() { }
 
@@ -47,4 +51,5 @@
     int firePower_;
     int firingRate_;
+    Ogre::Real bulletSpeed_;
   };
 
Index: code/branches/main_reto_vs05/src/weapon_manager.cc
===================================================================
--- code/branches/main_reto_vs05/src/weapon_manager.cc	(revision 169)
+++ code/branches/main_reto_vs05/src/weapon_manager.cc	(revision 177)
@@ -27,7 +27,15 @@
 
 #include "OgreSceneManager.h"
+#include "OgreEntity.h"
+#include "OgreSceneNode.h"
+#include "OgreVector3.h"
+#include "OgreStringConverter.h"
 
 #include "weapon.h"
+#include "bullet.h"
+#include "bullet_manager.h"
 #include "weapon_manager.h"
+
+#define ACTION_LIST_SIZE 4
 
 
@@ -38,8 +46,15 @@
 
   WeaponManager::WeaponManager(SceneManager *sceneMgr, SceneNode *node,
-        int slotSize)
-        : sceneMgr_(sceneMgr), node_(node), slotSize_(slotSize), slotIndex_(0)
+        BulletManager *bulletManager, int slotSize)
+        : sceneMgr_(sceneMgr), node_(node), slotSize_(slotSize), slotIndex_(0),
+        bulletCounter_(0), primaryFireRequest_(false), currentState_(IDLE),
+        secondaryFireRequest_(false), selectedWeapon_(0),
+        bulletManager_(bulletManager),
+        actionListReadIndex_(0), actionListWriteIndex_(0)
   {
   	slots_ = new Weapon*[slotSize];
+    actionList_ = new Action[ACTION_LIST_SIZE];
+    for (int i = 0; i < ACTION_LIST_SIZE; i++)
+      actionList_[i] = NOTHING;
   }
 
@@ -49,4 +64,6 @@
     if (slots_)
       delete slots_;
+    if (actionList_)
+      delete actionList_;
   }
 
@@ -54,7 +71,11 @@
   bool WeaponManager::addWeapon(const Ogre::String &name)
   {
+    if (!weaponList_s)
+      return false;
+
     if (name == weaponList_s[0]->name_)
     {
       // this is ugly, but for the time being, it has to fit.
+      selectedWeapon_ = slotIndex_;
       slots_[slotIndex_++] = weaponList_s[0];
       return true;
@@ -65,8 +86,117 @@
 
 
+  bool WeaponManager::addAction(const Action act)
+  {
+    if (actionList_[actionListWriteIndex_] == NOTHING)
+    {
+      actionList_[actionListWriteIndex_] = act;
+      actionListWriteIndex_ = (actionListWriteIndex_ + 1) % ACTION_LIST_SIZE;
+      return true;
+    }
+    else
+      return false;
+  }
+
+
+  void WeaponManager::primaryFireRequest()
+  {
+    primaryFireRequest_ = true;
+  }
+
+
+  void WeaponManager::primaryFire()
+  {
+    currentState_ = PRIMARY_FIRE;
+
+    // TODO: add the name of the weapon manager. but for that,
+    // the factory is required.
+    SceneNode *temp = sceneMgr_->getRootSceneNode()->createChildSceneNode(
+          "BulletNode" + StringConverter::toString(bulletCounter_),
+          node_->getWorldPosition(), node_->getWorldOrientation());
+	  temp->setScale(Vector3(1, 1, 1) * 10);
+	  temp->yaw(Degree(-90));
+    Entity* bulletEntity = sceneMgr_->createEntity("BulletEntity"
+          + StringConverter::toString(bulletCounter_++), "Barrel.mesh");
+    Vector3 speed = (node_->getOrientation() * Vector3(0, 0, -1))
+          .normalisedCopy() * slots_[selectedWeapon_]->bulletSpeed_;
+	  bulletManager_->addBullet(new Bullet(temp, bulletEntity, speed));
+  
+    currentState_ = IDLE;
+  }
+
+
+  void WeaponManager::secondaryFireRequest()
+  {
+    secondaryFireRequest_ = true;
+  }
+
+  void WeaponManager::secondaryFire()
+  {
+  }
+
+
+  bool WeaponManager::tick(unsigned long time, Real deltaTime)
+  {
+    // return if no weapon has been added
+    if (!slots_[slotIndex_])
+      return true;
+
+    switch (currentState_)
+    {
+    case IDLE:
+      // first, process actions
+      if (actionList_[actionListReadIndex_] != NOTHING)
+      {
+        actionListReadIndex_ = (actionListReadIndex_ + 1) % ACTION_LIST_SIZE;
+        break;
+      }
+
+      switch (actionList_[actionListReadIndex_])
+      {
+      case RELOAD:
+        break;
+
+      case ZOOM_IN:
+        break;
+
+      case ZOOM_OUT:
+        break;
+
+      default:
+        break;
+      }
+
+      // secondly, execute firing
+      if (primaryFireRequest_)
+        primaryFire();
+      else if (secondaryFireRequest_)
+        secondaryFire();
+
+      break;
+
+    case PRIMARY_FIRE:
+      break;
+
+    case SECONDARY_FIRE:
+      break;
+
+    case RELOADING:
+      break;
+    }
+
+    primaryFireRequest_ = false;
+    secondaryFireRequest_ = false;
+
+    return true;
+  }
+
+
   // static
   bool WeaponManager::loadWeapons()
   {
-    weaponList_s[0] = new Weapon("Barrel Gun", 10, 2);
+    weaponList_s = new Weapon*[5];
+    for (int i = 0; i < 5; i++)
+      weaponList_s[i] = NULL;
+    weaponList_s[0] = new Weapon("Barrel Gun", 10, 2, 500);
     return true;
   }
@@ -76,5 +206,11 @@
   void WeaponManager::destroyWeapons()
   {
-    delete weaponList_s[0];
+    if (weaponList_s)
+    {
+      for (int i = 0; i < 5; i++)
+        if (weaponList_s[i])
+          delete weaponList_s[i];
+      delete weaponList_s;
+    }
   }
 
Index: code/branches/main_reto_vs05/src/weapon_manager.h
===================================================================
--- code/branches/main_reto_vs05/src/weapon_manager.h	(revision 169)
+++ code/branches/main_reto_vs05/src/weapon_manager.h	(revision 177)
@@ -40,12 +40,43 @@
   {
   public:
-    WeaponManager(Ogre::SceneManager*, Ogre::SceneNode*, int);
+    enum Action {
+      NOTHING  = 0,
+      RELOAD   = 1,
+      ZOOM_IN  = 2,
+      ZOOM_OUT = 3
+    };
+
+  protected:
+    enum State {
+      IDLE = 0,
+      PRIMARY_FIRE = 1,
+      SECONDARY_FIRE = 2,
+      RELOADING = 4
+    };
+
+  public:
+    WeaponManager(Ogre::SceneManager*, Ogre::SceneNode*, BulletManager*, int);
 	  virtual ~WeaponManager();
 
     bool addWeapon(const Ogre::String&);
 
+    bool addAction(const Action);
+
+    void primaryFireRequest();
+
+    void secondaryFireRequest();
+
+    bool tick(unsigned long, Ogre::Real);
+
     bool static loadWeapons();
 
     void static destroyWeapons();
+
+  protected:
+    void primaryFire();
+
+    void secondaryFire();
+
+  public:
 
   protected:
@@ -56,4 +87,17 @@
     int slotSize_;
     int slotIndex_;
+    int selectedWeapon_;
+
+    int bulletCounter_;
+    BulletManager *bulletManager_;
+
+    bool primaryFireRequest_;
+    bool secondaryFireRequest_;
+
+    State currentState_;
+
+    Action *actionList_;
+    int actionListReadIndex_;
+    int actionListWriteIndex_;
 
     static Weapon **weaponList_s;
