Index: orxonox/trunk/src/world_entities/character_attributes.cc
===================================================================
--- orxonox/trunk/src/world_entities/character_attributes.cc	(revision 3582)
+++ orxonox/trunk/src/world_entities/character_attributes.cc	(revision 3583)
@@ -49,13 +49,24 @@
  */
 void CharacterAttributes::setHealth(int health)
-{}
+{
+  this->health = health;
+}
 
 /**
    \brief adds health to the charater
    \param health
-   \returns health that couldnt be added due to healt limit
+   \returns health that couldnt be added due to healt limit, 0 if everything worked as normal
  */
 int CharacterAttributes::addHealth(int health)
-{}
+{
+  this->health += health;
+  int rest = this->healthMax - this->health;
+  if( rest < 0)
+    {
+      this->health = this->healthMax;
+      return 0;
+    }
+  return rest;
+}
 
 /**
@@ -65,5 +76,13 @@
  */
 bool CharacterAttributes::substractHealth(int health)
-{}
+{
+  this->health -= health;
+  if( this->health < 0)
+    {
+      this->health = 0;
+      return false;
+    }
+  return true;
+}
 
 /**
@@ -72,5 +91,7 @@
  */
 int CharacterAttributes::getHealth()
-{}
+{
+  return this->health;
+}
 
 
@@ -82,5 +103,7 @@
  */
 void CharacterAttributes::setHealthMax(int healthMax)
-{}
+{
+  this->healthMax = healthMax;
+}
 
 /**
@@ -89,5 +112,7 @@
  */
 int CharacterAttributes::getHealthMax()
-{}
+{
+  return this->healthMax;
+}
 
 
@@ -98,20 +123,34 @@
  */
 void CharacterAttributes::setShieldStrength(int shieldStrength)
-{}
+{
+  this->shieldStrength = shieldStrength;
+}
 
 /**
    \brief adds shield strength
    \param strength
+   
+   there is currently no limit to shieldstrength
  */
 void CharacterAttributes::addShieldStrength(int shiledStrength)
-{}
+{
+  this->shieldStrength += shieldStrength;
+}
 
 /**
    \brief substracts shield strength
    \param strength
-   \returns amount of shield strength below zero after substraction. Magic: Troumble
+   \returns amount of shield strength below zero after substraction. Magic: Troumble. if everything works allright, it returns 0
  */
 int CharacterAttributes::substractShieldStrength(int shieldStrength)
-{}
+{
+  int rest = this->shieldStrength -= shieldStrength;
+  if( rest < 0)
+    {
+      this->shieldStrength = 0;
+      return -rest;
+    }
+  return 0;
+}
 
 /**
@@ -120,5 +159,7 @@
  */
 int CharacterAttributes::getShieldStrength()
-{}
+{
+  return this->shieldStrength;
+}
 
 
@@ -127,14 +168,26 @@
    \brief sets the amount of base damage dealt to all aircrafts
    \param damage
+
+   There can be a difference between arms that hit a ground/air craft. Eg.
+   a tank will react differently to explosives than something in the air
+   (think about physics)
  */
 void CharacterAttributes::setDamageToAirCraft(int damage)
-{}
+{
+  this->damageToAirCraft = damage;
+}
 
 /**
    \brief gets the amount of base damage
    \returns base damage to aircrafts
+
+   There can be a difference between arms that hit a ground/air craft. Eg.
+   a tank will react differently to explosives than something in the air
+   (think about physics)
  */
 int CharacterAttributes::getDamageToAirCraft()
-{}
+{
+  return this->damageToAirCraft;
+}
 
 
@@ -142,14 +195,26 @@
    \brief sets the amount of base damage dealt to all groundcrafts
    \param damage
+
+   There can be a difference between arms that hit a ground/air craft. Eg.
+   a tank will react differently to explosives than something in the air
+   (think about physics)
  */
 void CharacterAttributes::setDamageToGroundCraft(int damage)
-{}
+{
+  this->damageToGroundCraft = damage;
+}
 
 /**
    \briefgets the amount of base damage
    \returns base damage to groundcrafts
+
+   There can be a difference between arms that hit a ground/air craft. Eg.
+   a tank will react differently to explosives than something in the air
+   (think about physics)
  */
 int CharacterAttributes::getDamageToGroundCraft()
-{}
+{
+  return this->damageToGroundCraft;
+}
 
 
@@ -161,5 +226,7 @@
  */
 void CharacterAttributes::setDamageLaserModifier(float modifier)
-{}
+{
+  this->damageLaserModifier = modifier;
+}
 
 /**
@@ -170,5 +237,7 @@
  */
 float CharacterAttributes::getDamageLaserModifier()
-{}
+{
+  return this->damageLaserModifier;
+}
 
 
@@ -180,5 +249,7 @@
  */
 void CharacterAttributes::setDamagePlasmaModifier(float modifier)
-{}
+{
+  this->damagePlasmaModifier = modifier;
+}
 
 /**
@@ -189,5 +260,7 @@
  */
 float CharacterAttributes::getDamagePlasmaModifier()
-{}
+{
+  return this->damagePlasmaModifier;
+}
 
 
@@ -199,5 +272,7 @@
  */
 void CharacterAttributes::setDamageExplosiveModifier(float modifier)
-{}
+{
+  this->damageExplosiveModifier = modifier;
+}
 
 /**
@@ -208,5 +283,7 @@
  */
 float CharacterAttributes::getDamageExplosiveModifier()
-{}
+{
+  return this->damageExplosiveModifier;
+}
 
 
@@ -217,5 +294,7 @@
  */
 void CharacterAttributes::setEnergy(int energy)
-{}
+{
+  this->energy = energy;
+}
 
 /**
@@ -225,5 +304,14 @@
  */
 int CharacterAttributes::addEnergy(int addEnergy)
-{}
+{
+  this->energy += addEnergy;
+  int rest = this->energyMax - this->energy;
+  if(rest < 0)
+    {
+      this->energy = 0;
+      return rest;
+    }
+  return 0;
+}
 
 /**
@@ -233,5 +321,13 @@
  */
 bool CharacterAttributes::substractEnergy(int subEnergy)
-{}
+{
+  this->energy -= subEnergy;
+  if(this->energy < 0)
+    {
+      this->energy = 0;
+      return false;
+    }
+  return true;
+}
 
 /**
@@ -240,5 +336,7 @@
  */
 int CharacterAttributes::getEnergy()
-{}
+{
+  return this->energy;
+}
 
 
@@ -247,6 +345,8 @@
    \param amount of energy
 */
-void setEnergyConsumption(int energy)
-{}
+void CharacterAttributes::setEnergyConsumption(int energy)
+{
+  this->energyConsumption = energy;
+}
 
 /**
@@ -254,6 +354,8 @@
    \returns amount of energy
 */
-int getEnergyConsumption()
-{}
+int CharacterAttributes::getEnergyConsumption()
+{
+  return this->energyConsumption;
+}
   
 
@@ -262,6 +364,8 @@
    \param amount of energy
 */
-void setEnergyMax(int energy)
-{}
+void CharacterAttributes::setEnergyMax(int energy)
+{
+  this->energyMax = energy;
+}
 
 /**
@@ -269,4 +373,6 @@
    \returns amount of energy
 */
-int getEnergyMax()
-{}
+int CharacterAttributes::getEnergyMax()
+{
+  return this->energyMax;
+}
Index: orxonox/trunk/src/world_entities/character_attributes.h
===================================================================
--- orxonox/trunk/src/world_entities/character_attributes.h	(revision 3582)
+++ orxonox/trunk/src/world_entities/character_attributes.h	(revision 3583)
@@ -70,5 +70,5 @@
   /* healt */
   int health;                        //<! the healt of a projectile
-  int helathMax;                     //<! the max healt of a projectile, =0 if no limit
+  int healthMax;                     //<! the max healt of a projectile, =0 if no limit
 
   /* armor/ shields */
@@ -81,5 +81,5 @@
   float damageLaserModifier;         //<! [0..1] the damage from laser is multiplied with this modifier. there can be things in the world, that are immune to certain damage
   float damagePlasmaModifier;        //<! [0..1] the damage from plasma is multiplied with this modifier. there can be things in the world, that are immune to certain damage
-  float damageExplosiveModifer;      //<! [0..1] the damage from exposives (rockets, tnt,...) is multiplied with this modifier. there can be things in the world, that are immune to certain damage
+  float damageExplosiveModifier;      //<! [0..1] the damage from exposives (rockets, tnt,...) is multiplied with this modifier. there can be things in the world, that are immune to certain damage 
 
   /* energy */
Index: orxonox/trunk/src/world_entities/player.cc
===================================================================
--- orxonox/trunk/src/world_entities/player.cc	(revision 3582)
+++ orxonox/trunk/src/world_entities/player.cc	(revision 3583)
@@ -20,4 +20,6 @@
 //#include "collision.h"
 #include "objModel.h"
+#include "list.h"
+#include "weapon.h"
 
 using namespace std;
@@ -30,4 +32,5 @@
 {
   this->model = new OBJModel("../data/models/reaplow.obj");
+  this->weapons = new tList<Weapon>();
 }
 
@@ -37,6 +40,33 @@
 Player::~Player ()
 {
-
-}
+  Weapon* w = this->weapons->enumerate(); 
+  while( w != NULL) 
+    { 
+      delete w;
+      w = this->weapons->nextElement();
+    }
+  delete this->weapons;
+}
+
+
+/**
+   \brief adds a weapon to the weapon list of player
+   \param weapon to add
+*/
+void Player::addWeapon(Weapon* weapon)
+{
+  this->weapons->add(weapon);
+}
+
+
+/**
+   \brief removes a weapon from the player
+   \param weapon to remove
+*/
+void Player::removeWeapon(Weapon* weapon)
+{
+  this->weapons->remove(weapon);
+}
+
 
 /**
Index: orxonox/trunk/src/world_entities/player.h
===================================================================
--- orxonox/trunk/src/world_entities/player.h	(revision 3582)
+++ orxonox/trunk/src/world_entities/player.h	(revision 3583)
@@ -9,5 +9,7 @@
 #include "world_entity.h"
 
+template<class T> class tList;
 class OBJModel;
+class Weapon;
 
 //! Basic controllable WorldEntity
@@ -19,15 +21,17 @@
   Player(bool isFree = false);
   virtual ~Player();
+
+  void addWeapon(Weapon* weapon);
+  void removeWeapon(Weapon* weapon);
   
   virtual void postSpawn();
-  virtual void tick(float time);
+  virtual void leftWorld();
   virtual void hit(WorldEntity* weapon, Vector* loc);
   virtual void collide(WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags);
+
+  virtual void tick(float time);  
+  virtual void draw();
+
   virtual void command(Command* cmd);
-  
-  virtual void draw();
-  // virtual void getLookat(Location* locbuf);
-  
-  virtual void leftWorld();
   
  private:
@@ -40,4 +44,6 @@
   bool bFire;            //!< fire button pressed.
 
+  tList<Weapon>* weapons;//!< a list of weapon
+
   Vector velocity;       //!< the velocity of the player.
   float travelSpeed;     //!< the current speed of the player (to make soft movement)
Index: orxonox/trunk/src/world_entities/projectile.h
===================================================================
--- orxonox/trunk/src/world_entities/projectile.h	(revision 3582)
+++ orxonox/trunk/src/world_entities/projectile.h	(revision 3583)
@@ -25,8 +25,6 @@
 
  private:
-  int health;                        //<! the healt of a projectile
-  int maxHelath;                     //<! the max healt of a projectile
-  int damageToAirCraft;              //<! damage dealt to a air craft
-  int damageToGroundCraft;           //<! damage dealt to a ground craft
+  //physical attriutes like: force, speed, acceleration etc.
+
 };
 
Index: orxonox/trunk/src/world_entities/weapon.cc
===================================================================
--- orxonox/trunk/src/world_entities/weapon.cc	(revision 3582)
+++ orxonox/trunk/src/world_entities/weapon.cc	(revision 3583)
@@ -33,7 +33,5 @@
 */
 Weapon::Weapon () : WorldEntity()
-{
-  this->model = new OBJModel("");
-}
+{}
 
 
@@ -55,5 +53,7 @@
 */
 void Weapon::enable()
-{}
+{
+  this->enabled = true;
+}
 
 
@@ -66,5 +66,7 @@
 */
 void Weapon::disable()
-{}
+{
+  this->enabled = false;
+}
 
 
@@ -78,5 +80,7 @@
 */
 bool Weapon::isEnabled()
-{}
+{
+  return this->enabled;
+}
 
 
@@ -133,40 +137,32 @@
 {}
 
-
-/**
-   \brief this sets the energy of a weapon
-   \param amount of energy
-
-   a weapon has a limited amount of energy, this means a limited amount of shoots
-*/
-void Weapon::setWeaponEnergy(int energy)
-{}
-
-/**
-   \brief adds weapon energy
-   \param amount of energy
-   \returns amount of energy, that is over the energy limit
-
-   this can be used for energy-power up for example. There is a limited amount of energy
-   a weapon can have. so if you want to add more, than it supports, the rest will
-   be returned from this weapon.
-*/
-int Weapon::addWeaponEnergy(int addEnergy)
-{}
-
-/**
-   \brief removes weapon energy
-   \param amount of enery
-
-   this is the case, when ther should be some sort of energy loss in the weapon
-   system. propably wont be the case but usefull to have
-*/
-void Weapon::substractWeaponEnergy(int subEnergy)
-{}
-
-/**
-   \brief gets the amount of energy of a weapon (= ammo)
-*/
-int Weapon::getWeaponEnergy()
+/**
+   \brief sets a weapon idle time
+   \param idle time in ms
+
+   a weapon idle time is the time spend after a shoot until the weapon can
+   shoot again
+*/
+void Weapon::setWeaponIdleTime(float time)
+{}
+
+/**
+   \brief gets the weapon idle time
+   \returns idle time in ms
+
+   a weapon idle time is the time spend after a shoot until the weapon can
+   shoot again
+*/
+float Weapon::getWeaponIdleTime(void)
+{}
+
+/**
+   \brief checks if the idle time is elapsed
+   \return true if time is elapsed
+
+   a weapon idle time is the time spend after a shoot until the weapon can
+   shoot again
+*/
+bool Weapon::hasWeaponIdleTimeElapsed(void)
 {}
 
@@ -211,18 +207,14 @@
 
 /**
+   \brief is called, when there is no fire button pressed
+*/
+void Weapon::weaponIdle()
+{}
+
+
+/**
    \brief this will draw the weapon
 */
 void Weapon::draw () 
-{
-  glMatrixMode(GL_MODELVIEW);
-  glPushMatrix();
-
-  float matrix[4][4];
-  glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
-  this->getAbsDir().matrix (matrix);
-  glMultMatrixf((float*)matrix);
-  this->model->draw();
-
-  glPopMatrix();
-}
-
+{}
+
Index: orxonox/trunk/src/world_entities/weapon.h
===================================================================
--- orxonox/trunk/src/world_entities/weapon.h	(revision 3582)
+++ orxonox/trunk/src/world_entities/weapon.h	(revision 3583)
@@ -28,4 +28,14 @@
 class Projectile;
 
+typedef enum {
+  SHOOT,
+  EMPTY,
+  RELOAD,
+  SPECIAL1,
+  SPECIAL2,
+  SPECIAL3
+} weaponSoundType;
+
+
 class Weapon : public WorldEntity 
 {
@@ -36,36 +46,34 @@
   virtual ~Weapon ();
   
-  void enable();
-  void disable();
-  bool isEnabled();
+  void enable(void);
+  void disable(void);
+  bool isEnabled(void);
 
   void setProjectile(Projectile* projectile);
-  Projectile* getProjectile();
+  Projectile* getProjectile(void);
 
-  virtual void activate();
-  virtual void deactivate();
-  bool isActive();
+  virtual void activate(void);
+  virtual void deactivate(void);
+  bool isActive(void);
 
-  void setWeaponEnergy(int energy);
-  int addWeaponEnergy(int addEnergy);
-  void substractWeaponEnergy(int subEnergy);
-  int getWeaponEnergy();
+  virtual void setWeaponIdleTime(float time);
+  virtual float getWeaponIdleTime(void);
+  virtual bool hasWeaponIdleTimeElapsed(void);
 
-  virtual void fire();
+  virtual void fire(void);
   virtual void hit (WorldEntity* weapon, Vector* loc);
-  virtual void destroy ();
+  virtual void destroy(void);
   
-  virtual void tick (float time);
-  virtual void draw ();
+  virtual void tick(float time);
+  virtual void weaponIdle(void);
+  virtual void draw(void);
 
 
  private:
   bool enabled;
-  float firingRate;
   float localTime;
   float slowDownFactor;
-  int energyConsumption;
-  int energyLimit;
   Projectile* projectile;
+  //WeaponSound sound;
 
 };
Index: orxonox/trunk/src/world_entities/world_entity.cc
===================================================================
--- orxonox/trunk/src/world_entities/world_entity.cc	(revision 3582)
+++ orxonox/trunk/src/world_entities/world_entity.cc	(revision 3583)
@@ -52,24 +52,21 @@
 
 /**
-   \brief get the Location of the WorldEntity
-   \return a pointer to location
+   \brief sets the character attributes of a worldentity
+   \param character attributes
+
+   these attributes don't have to be set, only use them, if you need them
 */
-/*PN
-Location* WorldEntity::getLocation ()
-{
-  return &loc;
-}
-*/
+void WorldEntity::setCharacterAttributes(CharacterAttributes* charAttr)
+{}
+
 
 /**
-   \brief get the Placement of the WorldEntity
-   \return a pointer to placement
+   \brief gets the Character attributes of this worldentity
+   \returns character attributes
 */
- /*PN
-Placement* WorldEntity::getPlacement ()
-{
-  return &place;
-}
- */
+CharacterAttributes* WorldEntity::getCharacterAttributes()
+{}
+
+
 /**
    \brief query whether the WorldEntity in question is free
@@ -95,14 +92,4 @@
 }
 */
-
-/**
-   \brief this method is called every frame
-   \param time: the time in seconds that has passed since the last tick
-   
-   Handle all stuff that should update with time inside this method (movement, animation, etc.)
-*/
-void WorldEntity::tick(float time) 
-{
-}
 
 
@@ -132,12 +119,4 @@
 
 /**
-   \brief the entity is drawn onto the screen with this function
-   
-   This is a central function of an entity: call it to let the entity painted to the screen. Just override this function with whatever you want to be drawn.
-*/
-void WorldEntity::draw() 
-{}
-
-/**
    \brief this function is called, when two entities collide
    \param other: the world entity with whom it collides
@@ -149,4 +128,5 @@
 void WorldEntity::collide(WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags) {}
 
+
 /**
    \brief this function is called, when the ship is hit by a waepon
@@ -157,5 +137,4 @@
 */
 void WorldEntity::hit(WorldEntity* weapon, Vector* loc) {}
-
 
 
@@ -170,4 +149,36 @@
 }
 
+
+/**
+   \brief this method is called by the world if the WorldEntity leaves valid gamespace
+   
+   For free entities this means it left the Track boundaries. With bound entities it means its Location adresses a
+   place that is not in the world anymore. In both cases you might have to take extreme measures (a.k.a. call destroy).
+*/
+void WorldEntity::leftWorld ()
+{
+}
+
+
+/**
+   \brief this method is called every frame
+   \param time: the time in seconds that has passed since the last tick
+   
+   Handle all stuff that should update with time inside this method (movement, animation, etc.)
+*/
+void WorldEntity::tick(float time) 
+{
+}
+
+
+/**
+   \brief the entity is drawn onto the screen with this function
+   
+   This is a central function of an entity: call it to let the entity painted to the screen. Just override this function with whatever you want to be drawn.
+*/
+void WorldEntity::draw() 
+{}
+
+
 /**
    \brief this handles incoming command messages
@@ -180,25 +191,2 @@
 {
 }
-
-/**
-   \brief this is called by the local Camera to determine the point it should look at on the WorldEntity
-   \param locbuf: a pointer to the buffer to fill with a location to look at
-	
-   You may put any Location you want into locbuf, the Camera will determine via the corresponding Track how
-   to look at the location you return with this.
-*/
-/*PN
-void WorldEntity::getLookat (Location* locbuf)
-{
-}
-*/
-
-/**
-   \brief this method is called by the world if the WorldEntity leaves valid gamespace
-   
-   For free entities this means it left the Track boundaries. With bound entities it means its Location adresses a
-   place that is not in the world anymore. In both cases you might have to take extreme measures (a.k.a. call destroy).
-*/
-void WorldEntity::leftWorld ()
-{
-}
Index: orxonox/trunk/src/world_entities/world_entity.h
===================================================================
--- orxonox/trunk/src/world_entities/world_entity.h	(revision 3582)
+++ orxonox/trunk/src/world_entities/world_entity.h	(revision 3583)
@@ -12,4 +12,6 @@
 
 //class CollisionCluster;
+class CharacterAttributes;
+
 
 //! Basic class from which all interactive stuff in the world is derived from
@@ -23,15 +25,18 @@
 
 
-  OBJModel* model;                  //!< The model that should be loaded for this entity.
+
   
   //void setCollision (CollisionCluster* newhull);
   
-  bool isFree ();
-  
   //void addAbility(Ability* ability);
   //void removeAbility(Ability* ability);
-  
+  void setDrawable (bool bDraw);  
+  bool isFree ();
+  void setCharacterAttributes(CharacterAttributes* charAttr);
+  CharacterAttributes* getCharacterAttributes();
+
   virtual void postSpawn ();
-  virtual void tick (float time);
+  virtual void leftWorld ();
+
   virtual void hit (WorldEntity* weapon, Vector* loc);
   virtual void collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags);
@@ -40,7 +45,9 @@
   void processDraw ();
   virtual void draw ();
-  void setDrawable (bool bDraw);
+  virtual void tick (float time);
   
-  virtual void leftWorld ();
+ protected:
+  OBJModel* model;                  //!< The model that should be loaded for this entity.
+  CharacterAttributes* charAttr;      //!< the character attributes of a world_entity
   
  private:
@@ -49,4 +56,6 @@
   bool bDraw;                         //!< If it should be visible.
 
+
+
   //CollisionCluster* collisioncluster; //!< The collision-Cluster of this entity.
 };
