Index: /code/branches/FICN/src/orxonox/Main.cc
===================================================================
--- /code/branches/FICN/src/orxonox/Main.cc	(revision 667)
+++ /code/branches/FICN/src/orxonox/Main.cc	(revision 668)
@@ -72,5 +72,7 @@
 
 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
+#ifndef WIN32_LEAN_AND_MEAN
 #define WIN32_LEAN_AND_MEAN
+#endif
 #include "windows.h"
   INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT)
Index: /code/branches/FICN/src/orxonox/core/ArgReader.cc
===================================================================
--- /code/branches/FICN/src/orxonox/core/ArgReader.cc	(revision 667)
+++ /code/branches/FICN/src/orxonox/core/ArgReader.cc	(revision 668)
@@ -83,5 +83,5 @@
     if(argpos != 0)
     {
-      floating = atof(arguments_[argpos]);
+      floating = (float)atof(arguments_[argpos]);
     }
     else
Index: /code/branches/FICN/src/orxonox/core/Identifier.cc
===================================================================
--- /code/branches/FICN/src/orxonox/core/Identifier.cc	(revision 667)
+++ /code/branches/FICN/src/orxonox/core/Identifier.cc	(revision 668)
@@ -100,4 +100,5 @@
             COUT(1) << "Aborting...";
             abort();
+            return NULL;
         }
     }
Index: /code/branches/FICN/src/orxonox/hud/HUD.cc
===================================================================
--- /code/branches/FICN/src/orxonox/hud/HUD.cc	(revision 667)
+++ /code/branches/FICN/src/orxonox/hud/HUD.cc	(revision 668)
@@ -1,14 +1,41 @@
+/*
+ *   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 2
+ *   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, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Yuning Chai
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include <OgreOverlayManager.h>
+#include <OgreOverlayElement.h>
+#include <OgreStringConverter.h>
+
 #include "HUD.h"
-// #include <Ogre.h>
-// #include <OIS/OIS.h>
-//#include <CEGUI/CEGUI.h>
-//#include <CEGUIRenderer.h>
-
-
-using namespace Ogre;
+
 
 namespace hud {
-  HUD::HUD( void ) {
-
+  using namespace Ogre;
+
+  HUD::HUD(void)
+  {
     init();
 
@@ -184,8 +211,5 @@
 
     primarChoice_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/PrimarChoice");
-
-
-  }
-
+  }
 
 }
Index: /code/branches/FICN/src/orxonox/hud/HUD.h
===================================================================
--- /code/branches/FICN/src/orxonox/hud/HUD.h	(revision 667)
+++ /code/branches/FICN/src/orxonox/hud/HUD.h	(revision 668)
@@ -1,92 +1,110 @@
+/*
+ *   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 2
+ *   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, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Yuning Chai
+ *   Co-authors:
+ *      ...
+ *
+ */
+
 #ifndef MODULE_HUD_H
 #define MODULE_HUD_H
 
-// #include <Ogre.h>
-// #include <OIS/OIS.h>
-//#include <CEGUI/CEGUI.h>
-//#include <CEGUIRenderer.h>
-#include <OgreOverlayManager.h>
-#include <OgreOverlayElement.h>
-#include <OgreStringConverter.h>
+#include <OgrePrerequisites.h>
+
+//#include "../OrxonoxPrereqs.h"
 
 
-namespace hud
-{
+namespace hud {
+  class HUD {
+  private:
+    Ogre::OverlayElement* timeText_;
+    Ogre::OverlayElement* targetWindowNameText_;
+    Ogre::OverlayElement* targetWindowStatusText_;
+    Ogre::OverlayElement* targetWindowDistanceText_;
+    Ogre::OverlayElement* targetWindowHitRatingText_;
+    Ogre::OverlayElement* energyLength_;
+    Ogre::OverlayElement* shieldLeftTop_;
+    Ogre::OverlayElement* shieldRightTop_;
+    Ogre::OverlayElement* shieldLeftBottom_;
+    Ogre::OverlayElement* shieldRightBottom_;
+    Ogre::OverlayElement* rocketNum1_;
+    Ogre::OverlayElement* rocketNum2_;
+    Ogre::OverlayElement* rocketNum3_;
+    Ogre::OverlayElement* rocketNum4_;
+    Ogre::OverlayElement* energyDistrPoint_;
+    Ogre::OverlayElement* primarChoice_;
 
-class HUD
-{
+    int timeMin_;
+    int timeSec_;
 
-  private:
+    Ogre::String targetWindowName_;
+    Ogre::String targetWindowStatus_;
+    int targetWindowDistance_;
+    int targetWindowHitRating_;
 
-  Ogre::OverlayElement* timeText_;
-  Ogre::OverlayElement* targetWindowNameText_;
-  Ogre::OverlayElement* targetWindowStatusText_;
-  Ogre::OverlayElement* targetWindowDistanceText_;
-  Ogre::OverlayElement* targetWindowHitRatingText_;
-  Ogre::OverlayElement* energyLength_;
-  Ogre::OverlayElement* shieldLeftTop_;
-  Ogre::OverlayElement* shieldRightTop_;
-  Ogre::OverlayElement* shieldLeftBottom_;
-  Ogre::OverlayElement* shieldRightBottom_;
-  Ogre::OverlayElement* rocketNum1_;
-  Ogre::OverlayElement* rocketNum2_;
-  Ogre::OverlayElement* rocketNum3_;
-  Ogre::OverlayElement* rocketNum4_;
-  Ogre::OverlayElement* energyDistrPoint_;
-  Ogre::OverlayElement* primarChoice_;
+    int energyValue_;
 
-  int timeMin_;
-  int timeSec_;
+    bool shieldLeftTopValue_;
+    bool shieldRightTopValue_;
+    bool shieldLeftBottomValue_;
+    bool shieldRightBottomValue_;
 
-  Ogre::String targetWindowName_;
-  Ogre::String targetWindowStatus_;
-  int targetWindowDistance_;
-  int targetWindowHitRating_;
+    int rocket1_;
+    int rocket2_;
+    int rocket3_;
+    int rocket4_;
 
-  int energyValue_;
+    float energyDistrShield_;
+    float energyDistrEngine_;
+    float energyDistrLaser_;
 
-  bool shieldLeftTopValue_;
-  bool shieldRightTopValue_;
-  bool shieldLeftBottomValue_;
-  bool shieldRightBottomValue_;
+    float energyDistrPixelX_;
+    float energyDistrPixelY_;
 
-  int rocket1_;
-  int rocket2_;
-  int rocket3_;
-  int rocket4_;
-
-  float energyDistrShield_;
-  float energyDistrEngine_;
-  float energyDistrLaser_;
-
-  float energyDistrPixelX_;
-  float energyDistrPixelY_;
-
-  int primarValue_;
+    int primarValue_;
 
   public:
-  HUD( void );
-  ~HUD( void );
-  void init( void );
+    HUD( void );
+    ~HUD( void );
+    void init( void );
 
-  void setTime(int i, int j);
-  void setTargetWindowName(Ogre::String i);
-  void setTargetWindowStatus(Ogre::String i);
-  void setTargetWindowDistance(int i);
-  void setTargetWindowHitRating(int i);
-  void setEnergyValue(int i);
-  void setShieldLeftTopValue(bool i);
-  void setShieldRightTopValue(bool i);
-  void setShieldLeftBottomValue(bool i);
-  void setShieldRightBottomValue(bool i);
-  void setRocket1(int i);
-  void setRocket2(int i);
-  void setRocket3(int i);
-  void setRocket4(int i);
-  void setEnergyDistr(float s, float e, float l);
-  void setPrimar(int i);
+    void setTime(int i, int j);
+    void setTargetWindowName(Ogre::String i);
+    void setTargetWindowStatus(Ogre::String i);
+    void setTargetWindowDistance(int i);
+    void setTargetWindowHitRating(int i);
+    void setEnergyValue(int i);
+    void setShieldLeftTopValue(bool i);
+    void setShieldRightTopValue(bool i);
+    void setShieldLeftBottomValue(bool i);
+    void setShieldRightBottomValue(bool i);
+    void setRocket1(int i);
+    void setRocket2(int i);
+    void setRocket3(int i);
+    void setRocket4(int i);
+    void setEnergyDistr(float s, float e, float l);
+    void setPrimar(int i);
 
-};
+  };
+}
 
-}
 #endif
Index: /code/branches/FICN/src/orxonox/objects/Fighter.cc
===================================================================
--- /code/branches/FICN/src/orxonox/objects/Fighter.cc	(revision 667)
+++ /code/branches/FICN/src/orxonox/objects/Fighter.cc	(revision 668)
@@ -32,6 +32,6 @@
 #include "../core/CoreIncludes.h"
 #include "../Orxonox.h"
-#include "weapon_system/ammunition_dump.h"
-#include "weapon_system/barrel_gun.h"
+#include "weapon_system/AmmunitionDump.h"
+#include "weapon_system/BarrelGun.h"
 
 #include "OgreCamera.h"
Index: /code/branches/FICN/src/orxonox/objects/weapon_system/AmmunitionDump.cc
===================================================================
--- /code/branches/FICN/src/orxonox/objects/weapon_system/AmmunitionDump.cc	(revision 668)
+++ /code/branches/FICN/src/orxonox/objects/weapon_system/AmmunitionDump.cc	(revision 668)
@@ -0,0 +1,113 @@
+/*
+ *   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 2
+ *   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, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "orxonox/Orxonox.h"
+#include "BulletManager.h"
+#include "tinyxml/tinyxml.h"
+
+#include "AmmunitionDump.h"
+
+
+namespace orxonox {
+  CreateFactory(AmmunitionDump);
+
+  AmmunitionDump::AmmunitionDump()
+    : numberOfAmmos_(Orxonox::getSingleton()->getBulletMgr()->getNumberOfAmmos()),
+      stock_(new int[numberOfAmmos_]),
+      capacity_(new int[numberOfAmmos_])
+  {
+    RegisterObject(AmmunitionDump);
+
+    for (int i = 0; i < numberOfAmmos_; i++)
+    {
+      stock_[i] = 0;
+      capacity_[i] = 0;
+    }
+  }
+
+
+  AmmunitionDump::~AmmunitionDump()
+  {
+    if (stock_)
+      delete stock_;
+    if (capacity_)
+      delete capacity_;
+  }
+
+  void AmmunitionDump::setDumpSize(const Ogre::String &name, int size)
+  {
+    if (size < 0)
+      return;
+    int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name);
+    if (id == -1)
+      return;
+    capacity_[id] = size;
+  }
+
+
+  int AmmunitionDump::store(const Ogre::String &name, int quantity)
+  {
+    int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name);
+    if (id == -1)
+      return quantity;
+    stock_[id] += quantity;
+    if (stock_[id] > capacity_[id])
+    {
+      quantity = capacity_[id] - stock_[id];
+      stock_[id] = capacity_[id];
+      return quantity;
+    }
+    else
+      return 0;
+  }
+
+
+  int AmmunitionDump::getAmmunition(const Ogre::String &name, int quantity)
+  {
+    int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name);
+    if (id == -1)
+      return 0;
+    if (stock_[id] >= quantity)
+      stock_[id] -= quantity;
+    else
+    {
+      quantity = stock_[id];
+      stock_[id] = 0;
+    }
+    return quantity;
+  }
+
+
+  int AmmunitionDump::getStockSize(const Ogre::String &name)
+  {
+    int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name);
+    // FIXME changed = to ==, check if correct
+    if (id == -1)
+      return -1;
+    return stock_[id];
+  }
+}
Index: /code/branches/FICN/src/orxonox/objects/weapon_system/AmmunitionDump.h
===================================================================
--- /code/branches/FICN/src/orxonox/objects/weapon_system/AmmunitionDump.h	(revision 668)
+++ /code/branches/FICN/src/orxonox/objects/weapon_system/AmmunitionDump.h	(revision 668)
@@ -0,0 +1,68 @@
+/*
+ *   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 AmmunitionDump_H
+#define AmmunitionDump_H
+
+#include <OgrePrerequisites.h>
+
+#include "orxonox/OrxonoxPrereqs.h"
+
+#include "network/Synchronisable.h"
+//#include "../core/CoreIncludes.h"
+#include "../BaseObject.h"
+
+
+namespace orxonox {
+  class AmmunitionDump : public BaseObject, public network::Synchronisable
+  {
+  public:
+    AmmunitionDump();
+	  ~AmmunitionDump();
+
+    void setDumpSize(const Ogre::String &name, int size);
+
+    int store(const Ogre::String &name, int quantiy);
+
+    int getAmmunition(const Ogre::String &name, int quantity);
+
+    int getStockSize(const Ogre::String &name);
+
+    virtual void loadParams(TiXmlElement* xmlElem) { BaseObject::loadParams(xmlElem); };
+
+
+  protected:
+    inline bool create() { return true; }
+
+    int numberOfAmmos_;
+    int *stock_;
+    int *capacity_;
+  };
+}
+
+#endif /* AmmunitionDump_H */
Index: /code/branches/FICN/src/orxonox/objects/weapon_system/BarrelGun.cc
===================================================================
--- /code/branches/FICN/src/orxonox/objects/weapon_system/BarrelGun.cc	(revision 668)
+++ /code/branches/FICN/src/orxonox/objects/weapon_system/BarrelGun.cc	(revision 668)
@@ -0,0 +1,148 @@
+/*
+ *   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 2
+ *   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, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OgreMath.h"
+#include "OgreVector3.h"
+#include "OgreStringConverter.h"
+#include "OgreSceneNode.h"
+#include "OgreEntity.h"
+#include "OgreSceneManager.h"
+
+#include "Bullet.h"
+#include "BulletManager.h"
+#include "AmmunitionDump.h"
+#include "BaseWeapon.h"
+
+#include "BarrelGun.h"
+
+
+namespace orxonox {
+  using namespace Ogre;
+
+  CreateFactory(BarrelGun);
+
+  BarrelGun::BarrelGun()
+  {
+    RegisterObject(BarrelGun);
+
+    primaryFirePower_ = 100;
+    secondaryFirePower_ = 500;
+    primaryFiringRate_ = 1.0/7.0;
+    secondaryFiringRate_ = 1.0/2.0;
+    primaryBulletSpeed_ = 800;
+    secondaryBulletSpeed_ = 500;
+    magazineSize_ = 25;
+  }
+
+
+  BarrelGun::~BarrelGun()
+  {
+  }
+
+
+  void BarrelGun::primaryFire()
+  {
+    if (leftAmmo_ < 1)
+    {
+      currentState_ = IDLE;
+      return;
+    }
+
+    Ogre::SceneNode *temp = sceneMgr_->getRootSceneNode()->createChildSceneNode(
+          getNode()->getWorldPosition(),
+          getNode()->getWorldOrientation());
+
+    Ogre::Entity* bulletEntity = sceneMgr_->createEntity("BulletEntity"
+          + StringConverter::toString(bulletCounter_++), "Barrel.mesh");
+
+    Vector3 speed = (temp->getOrientation() * Vector3(1, 0, 0))
+          .normalisedCopy() * primaryBulletSpeed_;
+    speed += getVelocity();
+
+	  temp->setScale(Vector3(1, 1, 1) * 1.5);
+    temp->roll(Degree(90));
+
+    Bullet* bullet = new Bullet();
+    bullet->setNode(temp);
+    bullet->attachObject(bulletEntity);
+    bullet->setVelocity(speed);
+	  bulletManager_->addBullet(bullet);
+
+    --leftAmmo_;
+  }
+
+
+  void BarrelGun::primaryFiring(float time)
+  {
+    if (time > primaryFiringRate_)
+    {
+      currentState_ = IDLE;
+    }
+  }
+
+
+
+  void BarrelGun::secondaryFire()
+  {
+    if (leftAmmo_ < 5)
+    {
+      currentState_ = IDLE;
+      return;
+    }
+
+    Ogre::SceneNode *temp = sceneMgr_->getRootSceneNode()->createChildSceneNode(
+          getNode()->getWorldPosition(),
+          getNode()->getWorldOrientation());
+
+    Ogre::Entity* bulletEntity = sceneMgr_->createEntity("BulletEntity"
+          + StringConverter::toString(bulletCounter_++), "Barrel.mesh");
+
+    Vector3 speed = (temp->getOrientation() * Vector3(1, 0, 0))
+          .normalisedCopy() * secondaryBulletSpeed_*0.5;
+    speed += getVelocity();
+
+	  temp->setScale(Vector3(1, 1, 1) * 3);
+	  temp->roll(Degree(90));
+
+    Bullet* bullet = new Bullet();
+    bullet->setNode(temp);
+    bullet->attachObject(bulletEntity);
+    bullet->setVelocity(speed);
+	  bulletManager_->addBullet(bullet);
+
+
+    leftAmmo_ -= 5;
+  }
+
+
+  void BarrelGun::secondaryFiring(float time)
+  {
+    if (time > secondaryFiringRate_)
+      currentState_ = IDLE;
+  }
+
+}
Index: /code/branches/FICN/src/orxonox/objects/weapon_system/BarrelGun.h
===================================================================
--- /code/branches/FICN/src/orxonox/objects/weapon_system/BarrelGun.h	(revision 668)
+++ /code/branches/FICN/src/orxonox/objects/weapon_system/BarrelGun.h	(revision 668)
@@ -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 BARREL_GUN_H
+#define BARREL_GUN_H
+
+#include <OgrePrerequisites.h>
+
+#include "orxonox/OrxonoxPrereqs.h"
+
+#include "BaseWeapon.h"
+
+
+namespace orxonox {
+  class BarrelGun : public BaseWeapon
+  {
+ public:
+    BarrelGun();
+	  virtual ~BarrelGun();
+
+    //virtual void tick(float dt);
+
+  protected:
+    void primaryFire();
+
+    void primaryFiring(float);
+
+    void secondaryFire();
+
+    void secondaryFiring(float);
+
+  public:
+
+  protected:
+
+  };
+}
+
+#endif /* BARREL_GUN_H */
Index: /code/branches/FICN/src/orxonox/objects/weapon_system/BaseWeapon.cc
===================================================================
--- /code/branches/FICN/src/orxonox/objects/weapon_system/BaseWeapon.cc	(revision 668)
+++ /code/branches/FICN/src/orxonox/objects/weapon_system/BaseWeapon.cc	(revision 668)
@@ -0,0 +1,186 @@
+/*
+ *   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 2
+ *   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, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OgreMath.h"
+#include "OgreVector3.h"
+#include "OgreStringConverter.h"
+#include "OgreSceneNode.h"
+#include "OgreEntity.h"
+#include "OgreSceneManager.h"
+
+#include "../../Orxonox.h"
+
+#include "Bullet.h"
+#include "BulletManager.h"
+#include "AmmunitionDump.h"
+
+#include "BaseWeapon.h"
+
+
+namespace orxonox {
+  using namespace Ogre;
+  
+  //CreateFactory(BaseWeapon);
+
+  float BaseWeapon::nextActionValidityPeriod_ = 0.5;
+
+  BaseWeapon::BaseWeapon()
+    : sceneMgr_(Orxonox::getSingleton()->getSceneManager()),
+      bulletCounter_(0), primaryFireRequest_(false), currentState_(IDLE),
+      secondaryFireRequest_(false),
+      bulletManager_(Orxonox::getSingleton()->getBulletMgr()),
+      secondaryFired_(false),
+      timeSinceNextActionAdded_(0), actionAdded_(false), nextAction_(NOTHING),
+      ammoDump_(NULL), totalTime_(0.0), leftAmmo_(0)
+  {
+    RegisterObject(BaseWeapon);
+  }
+
+
+  BaseWeapon::~BaseWeapon()
+  {
+  }
+
+
+  bool BaseWeapon::addAction(const Action act)
+  {
+    if (nextAction_ == NOTHING)
+    {
+      nextAction_ = act;
+      actionAdded_ = true;
+      return true;
+    }
+    else
+      return false;
+  }
+
+
+  void BaseWeapon::primaryFireRequest()
+  {
+    primaryFireRequest_ = true;
+  }
+
+
+  void BaseWeapon::secondaryFireRequest()
+  {
+    secondaryFireRequest_ = true;
+  }
+
+
+  void BaseWeapon::tick(float dt)
+  {
+    totalTime_ += dt;
+    // process action adder
+    if (actionAdded_)
+    {
+      timeSinceNextActionAdded_ = totalTime_;
+      actionAdded_ = false;
+    }
+
+    if (currentState_ != IDLE)
+    {
+      switch (currentState_)
+      {
+      case PRIMARY_FIRE:
+        primaryFiring(totalTime_ - actionStartTime_);
+        break;
+
+      case SECONDARY_FIRE:
+        secondaryFiring(totalTime_ - actionStartTime_);
+        break;
+
+      case RELOADING:
+        break;
+
+      case CHANGING_AMMO:
+        break;
+      }
+    }
+
+    if (currentState_ == IDLE)
+    {
+      // first, process next action
+      if (nextAction_ != NOTHING)
+      {
+        actionStartTime_ = totalTime_;
+        switch (nextAction_)
+        {
+        case RELOAD:
+          leftAmmo_ += ammoDump_->getAmmunition("Barrel", magazineSize_ - leftAmmo_);
+          break;
+
+        case CHANGE_AMMO:
+          break;
+
+        case SPECIAL:
+          break;
+
+        default:
+          break;
+        }
+
+        // pay attention when multithreaded!
+        nextAction_ = NOTHING;
+      }
+      else
+      {
+        // secondly, execute firing
+        if (primaryFireRequest_ && !(secondaryFired_ && secondaryFireRequest_))
+        {
+          actionStartTime_ = totalTime_;
+          currentState_ = PRIMARY_FIRE;
+          secondaryFired_ = false;
+          primaryFire();
+        }
+        else if (secondaryFireRequest_)
+        {
+          actionStartTime_ = totalTime_;
+          currentState_ = SECONDARY_FIRE;
+          secondaryFired_ = true;
+          secondaryFire();
+        }
+      }
+    }
+
+    primaryFireRequest_ = false;
+    secondaryFireRequest_ = false;
+
+    if (totalTime_ - timeSinceNextActionAdded_ > nextActionValidityPeriod_)
+      nextAction_ = NOTHING;
+  }
+
+
+  int BaseWeapon::getAmmoState()
+  {
+    return leftAmmo_;
+  }
+
+  void BaseWeapon::setAmmoDump(AmmunitionDump* dump)
+  {
+    this->ammoDump_ = dump;
+  }
+}
Index: /code/branches/FICN/src/orxonox/objects/weapon_system/BaseWeapon.h
===================================================================
--- /code/branches/FICN/src/orxonox/objects/weapon_system/BaseWeapon.h	(revision 668)
+++ /code/branches/FICN/src/orxonox/objects/weapon_system/BaseWeapon.h	(revision 668)
@@ -0,0 +1,126 @@
+/*
+ *   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 2
+ *   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, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+#ifndef BASE_WEAPON_H
+#define BASE_WEAPON_H
+
+#include <OgrePrerequisites.h>
+
+#include "orxonox/OrxonoxPrereqs.h"
+
+#include "../Model.h"
+
+
+namespace orxonox {
+  class BaseWeapon : public Model
+  {
+  public:
+    enum Action {
+      NOTHING  = 0,
+      RELOAD   = 1,
+      CHANGE_AMMO  = 2,
+      SPECIAL  = 3
+    };
+
+  protected:
+    enum State {
+      IDLE = 0,
+      PRIMARY_FIRE = 1,
+      SECONDARY_FIRE = 2,
+      RELOADING = 3,
+      CHANGING_AMMO = 4,
+    };
+
+  public:
+    BaseWeapon();
+	  virtual ~BaseWeapon();
+
+    bool addAction(const Action);
+
+    void primaryFireRequest();
+
+    void secondaryFireRequest();
+
+    int getAmmoState();
+
+    void setAmmoDump(AmmunitionDump*);
+
+    inline virtual void loadParams(TiXmlElement* xmlElem) { Model::loadParams(xmlElem); };
+
+    virtual void tick(float dt);
+
+  protected:
+    virtual void primaryFire() = 0;
+
+    virtual void primaryFiring(float) = 0;
+
+    virtual void secondaryFire() = 0;
+
+    virtual void secondaryFiring(float) = 0;
+
+    virtual void registerAllVariables() { };
+
+  public:
+
+  protected:
+    Ogre::SceneManager *sceneMgr_;
+
+    int bulletCounter_;
+    BulletManager *bulletManager_;
+
+    AmmunitionDump *ammoDump_;
+
+    bool primaryFireRequest_;
+    bool secondaryFireRequest_;
+
+    float totalTime_;
+    float actionStartTime_;
+
+    State currentState_;
+    bool secondaryFired_;
+
+    Action nextAction_;
+    bool actionAdded_;
+    float timeSinceNextActionAdded_;
+    static float nextActionValidityPeriod_;
+
+    // weapon properties
+    int leftAmmo_;
+    float primaryFirePower_;
+    float secondaryFirePower_;
+    float primaryFiringRate_;
+    float secondaryFiringRate_;
+    Ogre::Real primaryBulletSpeed_;
+    Ogre::Real secondaryBulletSpeed_;
+
+    int magazineSize_;
+
+  };
+}
+
+#endif /* BASE_WEAPON_H */
Index: /code/branches/FICN/src/orxonox/objects/weapon_system/BulletManager.cc
===================================================================
--- /code/branches/FICN/src/orxonox/objects/weapon_system/BulletManager.cc	(revision 668)
+++ /code/branches/FICN/src/orxonox/objects/weapon_system/BulletManager.cc	(revision 668)
@@ -0,0 +1,106 @@
+/*
+ *   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 2
+ *   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, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OgreSceneNode.h"
+
+#include "BulletManager.h"
+#include "Bullet.h"
+
+
+namespace orxonox {
+  using namespace Ogre;
+
+  CreateFactory(BulletManager);
+
+  BulletManager::BulletManager() : bulletsIndex_(0), bulletsSize_(8)
+  {
+    RegisterObject(BulletManager);
+    bullets_ = new Bullet*[bulletsSize_];
+  }
+
+
+  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;
+  }
+
+
+  void BulletManager::tick(float dt)
+  {
+    // update the bullet positions
+    for (int i = 0; i < bulletsIndex_; i++)
+    {
+      bullets_[i]->getNode()->translate(bullets_[i]->getVelocity()*dt);
+      //bullets_[i]->getNode()->yaw(Degree(dt*100));
+      //bullets_[i]->getNode()->roll(Degree(dt*300));
+    }
+  }
+
+  int BulletManager::getAmmunitionID(const Ogre::String &ammoName)
+  {
+    Ogre::String ammoTypes[] = { "Energy Cell", "Barrel", "Lead Shot" };
+    int ammoTypesLength = 3;
+
+    for (int i = 0; i < ammoTypesLength; i++)
+    {
+      if (ammoTypes[i] == ammoName)
+        return i;
+    }
+    return -1;
+  }
+
+  int BulletManager::getNumberOfAmmos()
+  {
+    return 3;
+  }
+
+}
Index: /code/branches/FICN/src/orxonox/objects/weapon_system/BulletManager.h
===================================================================
--- /code/branches/FICN/src/orxonox/objects/weapon_system/BulletManager.h	(revision 668)
+++ /code/branches/FICN/src/orxonox/objects/weapon_system/BulletManager.h	(revision 668)
@@ -0,0 +1,69 @@
+/*
+ *   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/OrxonoxPrereqs.h"
+
+#include "network/Synchronisable.h"
+#include "tinyxml/tinyxml.h"
+//#include "../core/CoreIncludes.h"
+#include "../BaseObject.h"
+#include "../Tickable.h"
+
+namespace orxonox {
+  class BulletManager : public BaseObject, public network::Synchronisable, public Tickable
+  {
+  public:
+    BulletManager();
+	  virtual ~BulletManager();
+
+    void addBullet(Bullet*);
+
+    int getAmmunitionID(const Ogre::String&);
+
+    int getNumberOfAmmos();
+
+    virtual void tick(float dt);
+
+    inline virtual void loadParams(TiXmlElement* xmlElem) { BaseObject::loadParams(xmlElem); };
+
+  protected:
+    inline bool create() { return true; }
+
+    // Bullet array
+	  Bullet **bullets_;
+	  int bulletsSize_;
+	  int bulletsIndex_;
+  };
+}
+
+#endif /* BULLET_MANAGER_H */
Index: /code/branches/FICN/src/orxonox/objects/weapon_system/WeaponStation.cc
===================================================================
--- /code/branches/FICN/src/orxonox/objects/weapon_system/WeaponStation.cc	(revision 668)
+++ /code/branches/FICN/src/orxonox/objects/weapon_system/WeaponStation.cc	(revision 668)
@@ -0,0 +1,78 @@
+/*
+ *   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 2
+ *   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, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OgreMath.h"
+#include "OgreVector3.h"
+#include "OgreStringConverter.h"
+#include "OgreSceneNode.h"
+#include "OgreEntity.h"
+#include "OgreSceneManager.h"
+
+#include "BaseWeapon.h"
+
+#include "WeaponStation.h"
+
+
+namespace orxonox {
+  using namespace Ogre;
+
+  WeaponStation::WeaponStation(int stationSize)
+        : stationSize_(stationSize), lastActiveSlotIndex_(-1),
+        slots_(new BaseWeapon*[stationSize])
+  {
+  	//slots_ = new BaseWeapon*[stationSize];
+  }
+
+
+  WeaponStation::~WeaponStation()
+  {
+    if (slots_)
+      delete slots_;
+    // when factory available: delete weapons too
+  }
+
+
+  bool WeaponStation::addWeapon(BaseWeapon *weapon)
+  {
+    if (lastActiveSlotIndex_ = stationSize_ - 1)
+      return false;
+
+    // this is ugly, but for the time being, it has to fit.
+    slots_[++lastActiveSlotIndex_] = weapon;
+    selectedSlot_ = slots_ + lastActiveSlotIndex_;
+    return true;
+  }
+
+
+  BaseWeapon* WeaponStation::selectWeapon(int slotNumber)
+  {
+    if (slotNumber < lastActiveSlotIndex_)
+      return NULL;
+    return slots_[slotNumber];
+  }
+
+}
Index: /code/branches/FICN/src/orxonox/objects/weapon_system/WeaponStation.h
===================================================================
--- /code/branches/FICN/src/orxonox/objects/weapon_system/WeaponStation.h	(revision 668)
+++ /code/branches/FICN/src/orxonox/objects/weapon_system/WeaponStation.h	(revision 668)
@@ -0,0 +1,65 @@
+/*
+ *   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 WEAPON_STATION_H
+#define WEAPON_STATION_H
+
+#include <OgrePrerequisites.h>
+
+#include "orxonox/OrxonoxPrereqs.h"
+
+
+namespace orxonox {
+  class WeaponStation
+  {
+  public:
+    WeaponStation(int slotSize);
+	  ~WeaponStation();
+
+    bool addWeapon(BaseWeapon*);
+
+    //bool removeCurrentWeapon();
+
+    // TODO: access every weapon by name
+    BaseWeapon* selectWeapon(int slotNumber);
+
+  protected:
+
+  public:
+
+  protected:
+    // slot management
+    BaseWeapon **slots_;
+    BaseWeapon **selectedSlot_;
+    int lastActiveSlotIndex_;
+    int stationSize_;
+
+  };
+}
+
+#endif /* WEAPON_STATION_H */
Index: de/branches/FICN/src/orxonox/objects/weapon_system/ammunition_dump.cc
===================================================================
--- /code/branches/FICN/src/orxonox/objects/weapon_system/ammunition_dump.cc	(revision 667)
+++ 	(revision )
@@ -1,113 +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 2
- *   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, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#include "orxonox/Orxonox.h"
-#include "bullet_manager.h"
-#include "tinyxml/tinyxml.h"
-
-#include "ammunition_dump.h"
-
-
-namespace orxonox {
-  CreateFactory(AmmunitionDump);
-
-  AmmunitionDump::AmmunitionDump()
-    : numberOfAmmos_(Orxonox::getSingleton()->getBulletMgr()->getNumberOfAmmos()),
-      stock_(new int[numberOfAmmos_]),
-      capacity_(new int[numberOfAmmos_])
-  {
-    RegisterObject(AmmunitionDump);
-
-    for (int i = 0; i < numberOfAmmos_; i++)
-    {
-      stock_[i] = 0;
-      capacity_[i] = 0;
-    }
-  }
-
-
-  AmmunitionDump::~AmmunitionDump()
-  {
-    if (stock_)
-      delete stock_;
-    if (capacity_)
-      delete capacity_;
-  }
-
-  void AmmunitionDump::setDumpSize(const Ogre::String &name, int size)
-  {
-    if (size < 0)
-      return;
-    int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name);
-    if (id == -1)
-      return;
-    capacity_[id] = size;
-  }
-
-
-  int AmmunitionDump::store(const Ogre::String &name, int quantity)
-  {
-    int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name);
-    if (id == -1)
-      return quantity;
-    stock_[id] += quantity;
-    if (stock_[id] > capacity_[id])
-    {
-      quantity = capacity_[id] - stock_[id];
-      stock_[id] = capacity_[id];
-      return quantity;
-    }
-    else
-      return 0;
-  }
-
-
-  int AmmunitionDump::getAmmunition(const Ogre::String &name, int quantity)
-  {
-    int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name);
-    if (id == -1)
-      return 0;
-    if (stock_[id] >= quantity)
-      stock_[id] -= quantity;
-    else
-    {
-      quantity = stock_[id];
-      stock_[id] = 0;
-    }
-    return quantity;
-  }
-
-
-  int AmmunitionDump::getStockSize(const Ogre::String &name)
-  {
-    int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name);
-    // FIXME changed = to ==, check if correct
-    if (id == -1)
-      return -1;
-    return stock_[id];
-  }
-}
Index: de/branches/FICN/src/orxonox/objects/weapon_system/ammunition_dump.h
===================================================================
--- /code/branches/FICN/src/orxonox/objects/weapon_system/ammunition_dump.h	(revision 667)
+++ 	(revision )
@@ -1,68 +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 AmmunitionDump_H
-#define AmmunitionDump_H
-
-#include <OgrePrerequisites.h>
-
-#include "orxonox/OrxonoxPrereqs.h"
-
-#include "network/Synchronisable.h"
-//#include "../core/CoreIncludes.h"
-#include "../BaseObject.h"
-
-
-namespace orxonox {
-  class AmmunitionDump : public BaseObject, public network::Synchronisable
-  {
-  public:
-    AmmunitionDump();
-	  ~AmmunitionDump();
-
-    void setDumpSize(const Ogre::String &name, int size);
-
-    int store(const Ogre::String &name, int quantiy);
-
-    int getAmmunition(const Ogre::String &name, int quantity);
-
-    int getStockSize(const Ogre::String &name);
-
-    virtual void loadParams(TiXmlElement* xmlElem) { BaseObject::loadParams(xmlElem); };
-
-
-  protected:
-    inline bool create() { return true; }
-
-    int numberOfAmmos_;
-    int *stock_;
-    int *capacity_;
-  };
-}
-
-#endif /* AmmunitionDump_H */
Index: de/branches/FICN/src/orxonox/objects/weapon_system/barrel_gun.cc
===================================================================
--- /code/branches/FICN/src/orxonox/objects/weapon_system/barrel_gun.cc	(revision 667)
+++ 	(revision )
@@ -1,148 +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 2
- *   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, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#include "OgreMath.h"
-#include "OgreVector3.h"
-#include "OgreStringConverter.h"
-#include "OgreSceneNode.h"
-#include "OgreEntity.h"
-#include "OgreSceneManager.h"
-
-#include "bullet.h"
-#include "bullet_manager.h"
-#include "ammunition_dump.h"
-#include "base_weapon.h"
-
-#include "barrel_gun.h"
-
-
-namespace orxonox {
-  using namespace Ogre;
-
-  CreateFactory(BarrelGun);
-
-  BarrelGun::BarrelGun()
-  {
-    RegisterObject(BarrelGun);
-
-    primaryFirePower_ = 100;
-    secondaryFirePower_ = 500;
-    primaryFiringRate_ = 1.0/7.0;
-    secondaryFiringRate_ = 1.0/2.0;
-    primaryBulletSpeed_ = 800;
-    secondaryBulletSpeed_ = 500;
-    magazineSize_ = 25;
-  }
-
-
-  BarrelGun::~BarrelGun()
-  {
-  }
-
-
-  void BarrelGun::primaryFire()
-  {
-    if (leftAmmo_ < 1)
-    {
-      currentState_ = IDLE;
-      return;
-    }
-
-    Ogre::SceneNode *temp = sceneMgr_->getRootSceneNode()->createChildSceneNode(
-          getNode()->getWorldPosition(),
-          getNode()->getWorldOrientation());
-
-    Ogre::Entity* bulletEntity = sceneMgr_->createEntity("BulletEntity"
-          + StringConverter::toString(bulletCounter_++), "Barrel.mesh");
-
-    Vector3 speed = (temp->getOrientation() * Vector3(1, 0, 0))
-          .normalisedCopy() * primaryBulletSpeed_;
-    speed += getVelocity();
-
-	  temp->setScale(Vector3(1, 1, 1) * 1.5);
-    temp->roll(Degree(90));
-
-    Bullet* bullet = new Bullet();
-    bullet->setNode(temp);
-    bullet->attachObject(bulletEntity);
-    bullet->setVelocity(speed);
-	  bulletManager_->addBullet(bullet);
-
-    --leftAmmo_;
-  }
-
-
-  void BarrelGun::primaryFiring(float time)
-  {
-    if (time > primaryFiringRate_)
-    {
-      currentState_ = IDLE;
-    }
-  }
-
-
-
-  void BarrelGun::secondaryFire()
-  {
-    if (leftAmmo_ < 5)
-    {
-      currentState_ = IDLE;
-      return;
-    }
-
-    Ogre::SceneNode *temp = sceneMgr_->getRootSceneNode()->createChildSceneNode(
-          getNode()->getWorldPosition(),
-          getNode()->getWorldOrientation());
-
-    Ogre::Entity* bulletEntity = sceneMgr_->createEntity("BulletEntity"
-          + StringConverter::toString(bulletCounter_++), "Barrel.mesh");
-
-    Vector3 speed = (temp->getOrientation() * Vector3(1, 0, 0))
-          .normalisedCopy() * secondaryBulletSpeed_*0.5;
-    speed += getVelocity();
-
-	  temp->setScale(Vector3(1, 1, 1) * 3);
-	  temp->roll(Degree(90));
-
-    Bullet* bullet = new Bullet();
-    bullet->setNode(temp);
-    bullet->attachObject(bulletEntity);
-    bullet->setVelocity(speed);
-	  bulletManager_->addBullet(bullet);
-
-
-    leftAmmo_ -= 5;
-  }
-
-
-  void BarrelGun::secondaryFiring(float time)
-  {
-    if (time > secondaryFiringRate_)
-      currentState_ = IDLE;
-  }
-
-}
Index: de/branches/FICN/src/orxonox/objects/weapon_system/barrel_gun.h
===================================================================
--- /code/branches/FICN/src/orxonox/objects/weapon_system/barrel_gun.h	(revision 667)
+++ 	(revision )
@@ -1,64 +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/OrxonoxPrereqs.h"
-
-#include "base_weapon.h"
-
-
-namespace orxonox {
-  class BarrelGun : public BaseWeapon
-  {
- public:
-    BarrelGun();
-	  virtual ~BarrelGun();
-
-    //virtual void tick(float dt);
-
-  protected:
-    void primaryFire();
-
-    void primaryFiring(float);
-
-    void secondaryFire();
-
-    void secondaryFiring(float);
-
-  public:
-
-  protected:
-
-  };
-}
-
-#endif /* BARREL_GUN_H */
Index: de/branches/FICN/src/orxonox/objects/weapon_system/base_weapon.cc
===================================================================
--- /code/branches/FICN/src/orxonox/objects/weapon_system/base_weapon.cc	(revision 667)
+++ 	(revision )
@@ -1,186 +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 2
- *   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, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#include "OgreMath.h"
-#include "OgreVector3.h"
-#include "OgreStringConverter.h"
-#include "OgreSceneNode.h"
-#include "OgreEntity.h"
-#include "OgreSceneManager.h"
-
-#include "../../Orxonox.h"
-
-#include "bullet.h"
-#include "bullet_manager.h"
-#include "ammunition_dump.h"
-
-#include "base_weapon.h"
-
-
-namespace orxonox {
-  using namespace Ogre;
-  
-  CreateFactory(BaseWeapon);
-
-  float BaseWeapon::nextActionValidityPeriod_ = 0.5;
-
-  BaseWeapon::BaseWeapon()
-    : sceneMgr_(Orxonox::getSingleton()->getSceneManager()),
-      bulletCounter_(0), primaryFireRequest_(false), currentState_(IDLE),
-      secondaryFireRequest_(false),
-      bulletManager_(Orxonox::getSingleton()->getBulletMgr()),
-      secondaryFired_(false),
-      timeSinceNextActionAdded_(0), actionAdded_(false), nextAction_(NOTHING),
-      ammoDump_(NULL), totalTime_(0.0), leftAmmo_(0)
-  {
-    RegisterObject(BaseWeapon);
-  }
-
-
-  BaseWeapon::~BaseWeapon()
-  {
-  }
-
-
-  bool BaseWeapon::addAction(const Action act)
-  {
-    if (nextAction_ == NOTHING)
-    {
-      nextAction_ = act;
-      actionAdded_ = true;
-      return true;
-    }
-    else
-      return false;
-  }
-
-
-  void BaseWeapon::primaryFireRequest()
-  {
-    primaryFireRequest_ = true;
-  }
-
-
-  void BaseWeapon::secondaryFireRequest()
-  {
-    secondaryFireRequest_ = true;
-  }
-
-
-  void BaseWeapon::tick(float dt)
-  {
-    totalTime_ += dt;
-    // process action adder
-    if (actionAdded_)
-    {
-      timeSinceNextActionAdded_ = totalTime_;
-      actionAdded_ = false;
-    }
-
-    if (currentState_ != IDLE)
-    {
-      switch (currentState_)
-      {
-      case PRIMARY_FIRE:
-        primaryFiring(totalTime_ - actionStartTime_);
-        break;
-
-      case SECONDARY_FIRE:
-        secondaryFiring(totalTime_ - actionStartTime_);
-        break;
-
-      case RELOADING:
-        break;
-
-      case CHANGING_AMMO:
-        break;
-      }
-    }
-
-    if (currentState_ == IDLE)
-    {
-      // first, process next action
-      if (nextAction_ != NOTHING)
-      {
-        actionStartTime_ = totalTime_;
-        switch (nextAction_)
-        {
-        case RELOAD:
-          leftAmmo_ += ammoDump_->getAmmunition("Barrel", magazineSize_ - leftAmmo_);
-          break;
-
-        case CHANGE_AMMO:
-          break;
-
-        case SPECIAL:
-          break;
-
-        default:
-          break;
-        }
-
-        // pay attention when multithreaded!
-        nextAction_ = NOTHING;
-      }
-      else
-      {
-        // secondly, execute firing
-        if (primaryFireRequest_ && !(secondaryFired_ && secondaryFireRequest_))
-        {
-          actionStartTime_ = totalTime_;
-          currentState_ = PRIMARY_FIRE;
-          secondaryFired_ = false;
-          primaryFire();
-        }
-        else if (secondaryFireRequest_)
-        {
-          actionStartTime_ = totalTime_;
-          currentState_ = SECONDARY_FIRE;
-          secondaryFired_ = true;
-          secondaryFire();
-        }
-      }
-    }
-
-    primaryFireRequest_ = false;
-    secondaryFireRequest_ = false;
-
-    if (totalTime_ - timeSinceNextActionAdded_ > nextActionValidityPeriod_)
-      nextAction_ = NOTHING;
-  }
-
-
-  int BaseWeapon::getAmmoState()
-  {
-    return leftAmmo_;
-  }
-
-  void BaseWeapon::setAmmoDump(AmmunitionDump* dump)
-  {
-    this->ammoDump_ = dump;
-  }
-}
Index: de/branches/FICN/src/orxonox/objects/weapon_system/base_weapon.h
===================================================================
--- /code/branches/FICN/src/orxonox/objects/weapon_system/base_weapon.h	(revision 667)
+++ 	(revision )
@@ -1,126 +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 BASE_WEAPON_H
-#define BASE_WEAPON_H
-
-#include <OgrePrerequisites.h>
-
-#include "orxonox/OrxonoxPrereqs.h"
-
-#include "../Model.h"
-
-
-namespace orxonox {
-  class BaseWeapon : public Model
-  {
-  public:
-    enum Action {
-      NOTHING  = 0,
-      RELOAD   = 1,
-      CHANGE_AMMO  = 2,
-      SPECIAL  = 3
-    };
-
-  protected:
-    enum State {
-      IDLE = 0,
-      PRIMARY_FIRE = 1,
-      SECONDARY_FIRE = 2,
-      RELOADING = 3,
-      CHANGING_AMMO = 4,
-    };
-
-  public:
-    BaseWeapon();
-	  virtual ~BaseWeapon();
-
-    bool addAction(const Action);
-
-    void primaryFireRequest();
-
-    void secondaryFireRequest();
-
-    int getAmmoState();
-
-    void setAmmoDump(AmmunitionDump*);
-
-    inline virtual void loadParams(TiXmlElement* xmlElem) { Model::loadParams(xmlElem); };
-
-    virtual void tick(float dt);
-
-  protected:
-    virtual void primaryFire() { };
-
-    virtual void primaryFiring(float) { };
-
-    virtual void secondaryFire() { };
-
-    virtual void secondaryFiring(float) { };
-
-    inline void registerAllVariables() { }//Model::registerAllVariables(); }
-
-  public:
-
-  protected:
-    Ogre::SceneManager *sceneMgr_;
-
-    int bulletCounter_;
-    BulletManager *bulletManager_;
-
-    AmmunitionDump *ammoDump_;
-
-    bool primaryFireRequest_;
-    bool secondaryFireRequest_;
-
-    float totalTime_;
-    float actionStartTime_;
-
-    State currentState_;
-    bool secondaryFired_;
-
-    Action nextAction_;
-    bool actionAdded_;
-    float timeSinceNextActionAdded_;
-    static float nextActionValidityPeriod_;
-
-    // weapon properties
-    int leftAmmo_;
-    float primaryFirePower_;
-    float secondaryFirePower_;
-    float primaryFiringRate_;
-    float secondaryFiringRate_;
-    Ogre::Real primaryBulletSpeed_;
-    Ogre::Real secondaryBulletSpeed_;
-
-    int magazineSize_;
-
-  };
-}
-
-#endif /* BASE_WEAPON_H */
Index: de/branches/FICN/src/orxonox/objects/weapon_system/bullet.cc
===================================================================
--- /code/branches/FICN/src/orxonox/objects/weapon_system/bullet.cc	(revision 667)
+++ 	(revision )
@@ -1,48 +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 2
- *   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, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#include "OgreSceneNode.h"
-#include "OgreEntity.h"
-#include "OgreVector3.h"
-
-#include "bullet.h"
-
-
-namespace orxonox {
-  using namespace Ogre;
-
-  CreateFactory(Bullet);
-
-  Bullet::Bullet()
-  {
-    RegisterObject(Bullet);
-  }
-
-  Bullet::~Bullet()
-  {
-  }
-}
Index: de/branches/FICN/src/orxonox/objects/weapon_system/bullet.h
===================================================================
--- /code/branches/FICN/src/orxonox/objects/weapon_system/bullet.h	(revision 667)
+++ 	(revision )
@@ -1,51 +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 BULLET_H
-#define BULLET_H
-
-#include <OgrePrerequisites.h>
-
-#include "orxonox/OrxonoxPrereqs.h"
-
-#include "../Model.h"
-
-namespace orxonox {
-  class Bullet : public Model
-  {
-  public:
-	  Bullet();
-	  ~Bullet();
-
-    virtual void tick(float dt) { }
-
-    inline virtual void loadParams(TiXmlElement* xmlElem) { Model::loadParams(xmlElem); };
- };
-}
-
-#endif /* BULLET_H */
Index: de/branches/FICN/src/orxonox/objects/weapon_system/bullet_manager.cc
===================================================================
--- /code/branches/FICN/src/orxonox/objects/weapon_system/bullet_manager.cc	(revision 667)
+++ 	(revision )
@@ -1,106 +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 2
- *   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, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#include "OgreSceneNode.h"
-
-#include "bullet_manager.h"
-#include "bullet.h"
-
-
-namespace orxonox {
-  using namespace Ogre;
-
-  CreateFactory(BulletManager);
-
-  BulletManager::BulletManager() : bulletsIndex_(0), bulletsSize_(8)
-  {
-    RegisterObject(BulletManager);
-    bullets_ = new Bullet*[bulletsSize_];
-  }
-
-
-  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;
-  }
-
-
-  void BulletManager::tick(float dt)
-  {
-    // update the bullet positions
-    for (int i = 0; i < bulletsIndex_; i++)
-    {
-      bullets_[i]->getNode()->translate(bullets_[i]->getVelocity()*dt);
-      //bullets_[i]->getNode()->yaw(Degree(dt*100));
-      //bullets_[i]->getNode()->roll(Degree(dt*300));
-    }
-  }
-
-  int BulletManager::getAmmunitionID(const Ogre::String &ammoName)
-  {
-    Ogre::String ammoTypes[] = { "Energy Cell", "Barrel", "Lead Shot" };
-    int ammoTypesLength = 3;
-
-    for (int i = 0; i < ammoTypesLength; i++)
-    {
-      if (ammoTypes[i] == ammoName)
-        return i;
-    }
-    return -1;
-  }
-
-  int BulletManager::getNumberOfAmmos()
-  {
-    return 3;
-  }
-
-}
Index: de/branches/FICN/src/orxonox/objects/weapon_system/bullet_manager.h
===================================================================
--- /code/branches/FICN/src/orxonox/objects/weapon_system/bullet_manager.h	(revision 667)
+++ 	(revision )
@@ -1,69 +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 BULLET_MANAGER_H
-#define BULLET_MANAGER_H
-
-#include <OgrePrerequisites.h>
-
-#include "orxonox/OrxonoxPrereqs.h"
-
-#include "network/Synchronisable.h"
-#include "tinyxml/tinyxml.h"
-//#include "../core/CoreIncludes.h"
-#include "../BaseObject.h"
-#include "../Tickable.h"
-
-namespace orxonox {
-  class BulletManager : public BaseObject, public network::Synchronisable, public Tickable
-  {
-  public:
-    BulletManager();
-	  virtual ~BulletManager();
-
-    void addBullet(Bullet*);
-
-    int getAmmunitionID(const Ogre::String&);
-
-    int getNumberOfAmmos();
-
-    virtual void tick(float dt);
-
-    inline virtual void loadParams(TiXmlElement* xmlElem) { BaseObject::loadParams(xmlElem); };
-
-  protected:
-    inline bool create() { return true; }
-
-    // Bullet array
-	  Bullet **bullets_;
-	  int bulletsSize_;
-	  int bulletsIndex_;
-  };
-}
-
-#endif /* BULLET_MANAGER_H */
Index: de/branches/FICN/src/orxonox/objects/weapon_system/weapon_platform.h
===================================================================
--- /code/branches/FICN/src/orxonox/objects/weapon_system/weapon_platform.h	(revision 667)
+++ 	(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:
- *      ...
- *
- */
-
-
-#ifndef WEAPON_PLATFORM_H
-#define WEAPON_PLATFORM_H
-
-
-#if defined( __WIN32__ ) || defined( _WIN32 )
-  #ifdef WEAPON_BUILD
-    #define _WeaponExport __declspec( dllexport )
-  #elif defined(WEAPON_STATIC)
-    #define _WeaponExport
-  #else
-    #define _WeaponExport __declspec( dllimport )
-  #endif
-#else
-  #define _WeaponExport
-#endif
-
-
-#endif /* WEAPON_PLATFORM_H */
Index: de/branches/FICN/src/orxonox/objects/weapon_system/weapon_prereq.h
===================================================================
--- /code/branches/FICN/src/orxonox/objects/weapon_system/weapon_prereq.h	(revision 667)
+++ 	(revision )
@@ -1,44 +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 WEAPON_PREREQUISITES_H
-#define WEAPON_PREREQUISITES_H
-
-#include "weapon_platform.h"
-
-namespace orxonox {
-  class AmmunitionDump;
-  class Bullet;
-  class BulletManager;
-  class BaseWeapon;
-  class BarrelGun;
-  class WeaponStation;
-}
-
-
-#endif /* WEAPON_PREREQUISITES_H */
Index: de/branches/FICN/src/orxonox/objects/weapon_system/weapon_station.cc
===================================================================
--- /code/branches/FICN/src/orxonox/objects/weapon_system/weapon_station.cc	(revision 667)
+++ 	(revision )
@@ -1,78 +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 2
- *   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, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#include "OgreMath.h"
-#include "OgreVector3.h"
-#include "OgreStringConverter.h"
-#include "OgreSceneNode.h"
-#include "OgreEntity.h"
-#include "OgreSceneManager.h"
-
-#include "base_weapon.h"
-
-#include "weapon_station.h"
-
-
-namespace orxonox {
-  using namespace Ogre;
-
-  WeaponStation::WeaponStation(int stationSize)
-        : stationSize_(stationSize), lastActiveSlotIndex_(-1),
-        slots_(new BaseWeapon*[stationSize])
-  {
-  	//slots_ = new BaseWeapon*[stationSize];
-  }
-
-
-  WeaponStation::~WeaponStation()
-  {
-    if (slots_)
-      delete slots_;
-    // when factory available: delete weapons too
-  }
-
-
-  bool WeaponStation::addWeapon(BaseWeapon *weapon)
-  {
-    if (lastActiveSlotIndex_ = stationSize_ - 1)
-      return false;
-
-    // this is ugly, but for the time being, it has to fit.
-    slots_[++lastActiveSlotIndex_] = weapon;
-    selectedSlot_ = slots_ + lastActiveSlotIndex_;
-    return true;
-  }
-
-
-  BaseWeapon* WeaponStation::selectWeapon(int slotNumber)
-  {
-    if (slotNumber < lastActiveSlotIndex_)
-      return NULL;
-    return slots_[slotNumber];
-  }
-
-}
Index: de/branches/FICN/src/orxonox/objects/weapon_system/weapon_station.h
===================================================================
--- /code/branches/FICN/src/orxonox/objects/weapon_system/weapon_station.h	(revision 667)
+++ 	(revision )
@@ -1,65 +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 WEAPON_STATION_H
-#define WEAPON_STATION_H
-
-#include <OgrePrerequisites.h>
-
-#include "orxonox/OrxonoxPrereqs.h"
-
-
-namespace orxonox {
-  class WeaponStation
-  {
-  public:
-    WeaponStation(int slotSize);
-	  ~WeaponStation();
-
-    bool addWeapon(BaseWeapon*);
-
-    //bool removeCurrentWeapon();
-
-    // TODO: access every weapon by name
-    BaseWeapon* selectWeapon(int slotNumber);
-
-  protected:
-
-  public:
-
-  protected:
-    // slot management
-    BaseWeapon **slots_;
-    BaseWeapon **selectedSlot_;
-    int lastActiveSlotIndex_;
-    int stationSize_;
-
-  };
-}
-
-#endif /* WEAPON_STATION_H */
