Index: /orxonox/trunk/src/Makefile.am
===================================================================
--- /orxonox/trunk/src/Makefile.am	(revision 3617)
+++ /orxonox/trunk/src/Makefile.am	(revision 3618)
@@ -47,4 +47,5 @@
 		 world_entities/projectile.cc \
 		 world_entities/character_attributes.cc \
+		 world_entities/test_gun.cc \
 		 ai/ai.cc \
 		 lib/coord/p_node.cc \
@@ -95,4 +96,5 @@
 		 world_entities/projectile.h \
 		 world_entities/character_attributes.h \
+		 world_entities/test_gun.h \
 		 ai/ai.h \
 		 network/synchronisable.h \
Index: /orxonox/trunk/src/Makefile.in
===================================================================
--- /orxonox/trunk/src/Makefile.in	(revision 3617)
+++ /orxonox/trunk/src/Makefile.in	(revision 3618)
@@ -61,11 +61,12 @@
 	terrain.$(OBJEXT) primitive.$(OBJEXT) weapon.$(OBJEXT) \
 	projectile.$(OBJEXT) character_attributes.$(OBJEXT) \
-	ai.$(OBJEXT) p_node.$(OBJEXT) null_parent.$(OBJEXT) \
-	helper_parent.$(OBJEXT) data_tank.$(OBJEXT) \
-	graphics_engine.$(OBJEXT) light.$(OBJEXT) fontset.$(OBJEXT) \
-	array.$(OBJEXT) objModel.$(OBJEXT) model.$(OBJEXT) \
-	material.$(OBJEXT) texture.$(OBJEXT) base_entity.$(OBJEXT) \
-	base_object.$(OBJEXT) ini_parser.$(OBJEXT) list.$(OBJEXT) \
-	vector.$(OBJEXT) curve.$(OBJEXT) glmenu_imagescreen.$(OBJEXT)
+	test_gun.$(OBJEXT) ai.$(OBJEXT) p_node.$(OBJEXT) \
+	null_parent.$(OBJEXT) helper_parent.$(OBJEXT) \
+	data_tank.$(OBJEXT) graphics_engine.$(OBJEXT) light.$(OBJEXT) \
+	fontset.$(OBJEXT) array.$(OBJEXT) objModel.$(OBJEXT) \
+	model.$(OBJEXT) material.$(OBJEXT) texture.$(OBJEXT) \
+	base_entity.$(OBJEXT) base_object.$(OBJEXT) \
+	ini_parser.$(OBJEXT) list.$(OBJEXT) vector.$(OBJEXT) \
+	curve.$(OBJEXT) glmenu_imagescreen.$(OBJEXT)
 orxonox_OBJECTS = $(am_orxonox_OBJECTS)
 orxonox_LDADD = $(LDADD)
@@ -95,5 +96,5 @@
 @AMDEP_TRUE@	./$(DEPDIR)/skysphere.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/story_entity.Po ./$(DEPDIR)/terrain.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/texture.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/test_gun.Po ./$(DEPDIR)/texture.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/track_manager.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/track_node.Po ./$(DEPDIR)/vector.Po \
@@ -249,4 +250,5 @@
 		 world_entities/projectile.cc \
 		 world_entities/character_attributes.cc \
+		 world_entities/test_gun.cc \
 		 ai/ai.cc \
 		 lib/coord/p_node.cc \
@@ -297,4 +299,5 @@
 		 world_entities/projectile.h \
 		 world_entities/character_attributes.h \
+		 world_entities/test_gun.h \
 		 ai/ai.h \
 		 network/synchronisable.h \
@@ -427,4 +430,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/story_entity.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/terrain.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_gun.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texture.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/track_manager.Po@am__quote@
@@ -642,4 +646,20 @@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o character_attributes.obj `if test -f 'world_entities/character_attributes.cc'; then $(CYGPATH_W) 'world_entities/character_attributes.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/character_attributes.cc'; fi`
+
+test_gun.o: world_entities/test_gun.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT test_gun.o -MD -MP -MF "$(DEPDIR)/test_gun.Tpo" -c -o test_gun.o `test -f 'world_entities/test_gun.cc' || echo '$(srcdir)/'`world_entities/test_gun.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/test_gun.Tpo" "$(DEPDIR)/test_gun.Po"; else rm -f "$(DEPDIR)/test_gun.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='world_entities/test_gun.cc' object='test_gun.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/test_gun.Po' tmpdepfile='$(DEPDIR)/test_gun.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o test_gun.o `test -f 'world_entities/test_gun.cc' || echo '$(srcdir)/'`world_entities/test_gun.cc
+
+test_gun.obj: world_entities/test_gun.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT test_gun.obj -MD -MP -MF "$(DEPDIR)/test_gun.Tpo" -c -o test_gun.obj `if test -f 'world_entities/test_gun.cc'; then $(CYGPATH_W) 'world_entities/test_gun.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/test_gun.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/test_gun.Tpo" "$(DEPDIR)/test_gun.Po"; else rm -f "$(DEPDIR)/test_gun.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='world_entities/test_gun.cc' object='test_gun.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/test_gun.Po' tmpdepfile='$(DEPDIR)/test_gun.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o test_gun.obj `if test -f 'world_entities/test_gun.cc'; then $(CYGPATH_W) 'world_entities/test_gun.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/test_gun.cc'; fi`
 
 ai.o: ai/ai.cc
Index: /orxonox/trunk/src/world_entities/player.cc
===================================================================
--- /orxonox/trunk/src/world_entities/player.cc	(revision 3617)
+++ /orxonox/trunk/src/world_entities/player.cc	(revision 3618)
@@ -192,13 +192,16 @@
 void Player::fire()
 {
-  if(this->bFire)
+  if( this->bFire)
     {
       if(this->activeWeapon != NULL)
 	this->activeWeapon->fire();
     }
-  if(this->bWeaponChange)
+  if( this->bWeaponChange && this->weapons->getSize() > 1)
     {
-      Weapon* w = this->weapons->enumerate(); 
+      PRINTF(1)("changing the weapon of the player: deactivate old, activate new\n");
+      this->activeWeapon->deactivate();
+      this->weapons->enumerate(); 
       this->activeWeapon = this->weapons->nextElement(this->activeWeapon);
+      this->activeWeapon->activate();
     }
 }
Index: /orxonox/trunk/src/world_entities/primitive.h
===================================================================
--- /orxonox/trunk/src/world_entities/primitive.h	(revision 3617)
+++ /orxonox/trunk/src/world_entities/primitive.h	(revision 3618)
@@ -1,2 +1,8 @@
+/*! 
+    \primitive.h
+    \brief representing a primitive body in the world: cube, sphere, cylinder  etc...
+*/
+
+
 #ifndef _PRIMITIVE_H
 #define _PRIMITIVE_H
@@ -34,8 +40,8 @@
   GLUquadricObj* object; //!< the object to be rendered
   Material* material;    //!< A Material for the SkySphere.
-  pForm form;
-  char* textureName;
-  float size;
-  int segments;
+  pForm form;            //!< the chooesen form for the entity
+  char* textureName;     //!< if there is a texture. this is the name for it
+  float size;            //!< size of the object, from [0..1]
+  int segments;          //!< segment count
 
   void glDrawCube();
Index: /orxonox/trunk/src/world_entities/projectile.cc
===================================================================
--- /orxonox/trunk/src/world_entities/projectile.cc	(revision 3617)
+++ /orxonox/trunk/src/world_entities/projectile.cc	(revision 3618)
@@ -18,8 +18,9 @@
 
 #include "projectile.h"
-#include "stdincl.h"
+
 #include "world_entity.h"
+#include "objModel.h"
+#include "primitive.h"
 #include "vector.h"
-#include "objModel.h"
 
 using namespace std;
@@ -31,5 +32,6 @@
 Projectile::Projectile () : WorldEntity()
 {
-  this->model = new OBJModel("");
+  //this->model = new OBJModel("");
+  this->projectileModel = new Primitive(P_SPHERE);
 }
 
Index: /orxonox/trunk/src/world_entities/projectile.h
===================================================================
--- /orxonox/trunk/src/world_entities/projectile.h	(revision 3617)
+++ /orxonox/trunk/src/world_entities/projectile.h	(revision 3618)
@@ -9,4 +9,5 @@
 #include "world_entity.h"
 
+class Primitive;
 
 class Projectile : public WorldEntity 
@@ -26,4 +27,5 @@
  private:
   //physical attriutes like: force, speed, acceleration etc.
+  Primitive* projectileModel;
 
 };
Index: /orxonox/trunk/src/world_entities/test_gun.cc
===================================================================
--- /orxonox/trunk/src/world_entities/test_gun.cc	(revision 3618)
+++ /orxonox/trunk/src/world_entities/test_gun.cc	(revision 3618)
@@ -0,0 +1,121 @@
+
+
+/* 
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   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, or (at your option)
+   any later version.
+
+   ### File Specific
+   main-programmer: Patrick Boenzli
+   co-programmer: 
+*/
+
+
+#include "test_gun.h"
+
+#include "stdincl.h"
+#include "world_entity.h"
+#include "objModel.h"
+#include "projectile.h"
+
+#include "vector.h"
+
+using namespace std;
+
+
+/**
+   \brief standard constructor
+
+   creates a new weapon
+*/
+TestGun::TestGun () : Weapon()
+{}
+
+
+/**
+   \brief standard deconstructor
+*/
+TestGun::~TestGun () 
+{
+  // model will be deleted from WorldEntity-destructor
+}
+
+
+/**
+   \brief this activates the weapon
+
+   This is needed, since there can be more than one weapon on a ship. the 
+   activation can be connected with an animation. for example the weapon is 
+   been armed out. 
+*/
+void TestGun::activate()
+{}
+
+
+/**
+   \brief this deactivates the weapon
+
+   This is needed, since there can be more than one weapon on a ship. the 
+   activation can be connected with an animation. for example the weapon is 
+   been armed out.
+*/
+void TestGun::deactivate()
+{}
+
+
+/**
+   \brief fires the weapon
+   
+   this is called from the player.cc, when fire-button is been pushed
+*/
+void TestGun::fire()
+{}
+
+
+/**
+   \brief is called, when the weapon gets hit (=collide with something)
+   \param from which entity it is been hit
+   \param where it is been hit
+
+   this may not be used, since it would make the game relay complicated when one
+   can destroy the weapons of enemies or vice versa.
+*/
+void TestGun::hit (WorldEntity* entity, Vector* position) 
+{}
+
+
+/**
+   \brief is called, when the weapon is destroyed
+
+   this is in conjunction with the hit function, so when a weapon is able to get
+   hit, it can also be destoryed.
+*/
+void TestGun::destroy () 
+{}
+
+
+/**
+   \brief tick signal for time dependent/driven stuff
+*/
+void TestGun::tick (float time) 
+{}
+
+
+/**
+   \brief is called, when there is no fire button pressed
+*/
+void TestGun::weaponIdle()
+{}
+
+
+/**
+   \brief this will draw the weapon
+*/
+void TestGun::draw () 
+{}
+
Index: /orxonox/trunk/src/world_entities/test_gun.h
===================================================================
--- /orxonox/trunk/src/world_entities/test_gun.h	(revision 3618)
+++ /orxonox/trunk/src/world_entities/test_gun.h	(revision 3618)
@@ -0,0 +1,52 @@
+/*! 
+    \file weapon.h
+    \brief a weapon that a player can use
+
+    A Player has a list of weapons, that can be choosen to shoot projectiles
+    (projectiles.{cc,h}) at ennemies. These weapons can be shooted sequentially
+    or (if able) combined. Therefore you can choose the weapon mode = choose
+    a weapon.
+
+    A weapon is characterized by:
+     o firing-rate: the initial firing rate of a weapon (1/s = Herz)
+     o slowdown-factor: this is a factor d: exp(-d*x), d is element of all positive R. it determines how fast the firing-rate will slow down. if no slowdown: d=0, the bigger d is, the faster the weapon will slow down!
+     o energy-consumption: this determines the energy that has to be used to produce this projectile = costs per projectile
+    
+    Furthermore there are some other attributes, that will help to represent a firing
+    weapon in this world:
+     o sound file/ressource: this is a pointer to the sound-file/ressource. however it may be represented
+     o shooting animation
+     
+*/
+
+
+#ifndef _TEST_GUN_H
+#define _TEST_GUN_H
+
+#include "weapon.h"
+
+class Projectile;
+
+
+class TestGun : public Weapon
+{
+  friend class World;
+
+ public:
+  TestGun ();
+  virtual ~TestGun ();
+
+  virtual void activate(void);
+  virtual void deactivate(void);
+
+  virtual void fire(void);
+  virtual void hit (WorldEntity* weapon, Vector* loc);
+  virtual void destroy(void);
+  
+  virtual void tick(float time);
+  virtual void weaponIdle(void);
+  virtual void draw(void);
+
+};
+
+#endif /* _TEST_GUN_H */
Index: /orxonox/trunk/src/world_entities/weapon.h
===================================================================
--- /orxonox/trunk/src/world_entities/weapon.h	(revision 3617)
+++ /orxonox/trunk/src/world_entities/weapon.h	(revision 3618)
@@ -57,7 +57,7 @@
   bool isActive(void);
 
-  virtual void setWeaponIdleTime(float time);
-  virtual float getWeaponIdleTime(void);
-  virtual bool hasWeaponIdleTimeElapsed(void);
+  void setWeaponIdleTime(float time);
+  float getWeaponIdleTime(void);
+  bool hasWeaponIdleTimeElapsed(void);
 
   virtual void fire(void);
