Index: /orxonox/trunk/src/world_entities/test_gun.cc
===================================================================
--- /orxonox/trunk/src/world_entities/test_gun.cc	(revision 3885)
+++ /orxonox/trunk/src/world_entities/test_gun.cc	(revision 3886)
@@ -53,37 +53,24 @@
 
 
-  this->dummy1 = new WorldEntity(); // a world entity that is not drawed: use this for the weapon 
-  this->animation = new Animation3D(dummy1);
-
-  parent->addChild(this->dummy1, PNODE_ALL);
-
-  this->animation->setInfinity(ANIM_INF_CONSTANT);
+  //this->dummy1 = new WorldEntity(); // a world entity that is not drawed: use this for the weapon 
+  this->objectComponent1 = new PNode();
+  this->animation1 = new Animation3D(this->objectComponent1);
+
+  parent->addChild(this->objectComponent1, PNODE_ALL);
+
+  this->animation1->setInfinity(ANIM_INF_CONSTANT);
   // ANIM_LINEAR was ANIM_NEG_EXP
-  if( this->leftRight == 0)
+  if( this->leftRight == W_LEFT)
     {
-      this->animation->addKeyFrame(Vector(-2.6, 0.1, 3.0), Quaternion(), 0.1, ANIM_LINEAR); 
-      this->animation->addKeyFrame(Vector(-3.0, 0.1, 3.0), Quaternion(), 0.5, ANIM_LINEAR);
-      this->animation->addKeyFrame(Vector(-2.6, 0.1, 3.0), Quaternion(), 0.1, ANIM_LINEAR);
+      this->animation1->addKeyFrame(Vector(-2.6, 0.1, 3.0), Quaternion(), 0.1, ANIM_LINEAR); 
+      this->animation1->addKeyFrame(Vector(-3.0, 0.1, 3.0), Quaternion(), 0.5, ANIM_LINEAR);
+      this->animation1->addKeyFrame(Vector(-2.6, 0.1, 3.0), Quaternion(), 0.1, ANIM_LINEAR);
     }
-  else if( this->leftRight == 1)
+  else if( this->leftRight == W_RIGHT)
     {
-      this->animation->addKeyFrame(Vector(-2.6, 0.1, -2.5), Quaternion(), 0.1, ANIM_LINEAR);
-      this->animation->addKeyFrame(Vector(-3.0, 0.1, -2.5), Quaternion(), 0.5, ANIM_LINEAR);
-      this->animation->addKeyFrame(Vector(-2.6, 0.1, -2.5), Quaternion(), 0.1, ANIM_LINEAR);
+      this->animation1->addKeyFrame(Vector(-2.6, 0.1, -2.5), Quaternion(), 0.1, ANIM_LINEAR);
+      this->animation1->addKeyFrame(Vector(-3.0, 0.1, -2.5), Quaternion(), 0.5, ANIM_LINEAR);
+      this->animation1->addKeyFrame(Vector(-2.6, 0.1, -2.5), Quaternion(), 0.1, ANIM_LINEAR);
     }
-  /*
-  if( this->leftRight == 0)
-    {
-      this->animation->addKeyFrame(Vector(-2.6, 0.1, 3.0), Quaternion(), 0.0, ANIM_NEG_EXP); 
-      this->animation->addKeyFrame(Vector(-3.0, 0.1, 3.0), Quaternion(), 0.1, ANIM_NEG_EXP);
-      this->animation->addKeyFrame(Vector(-2.6, 0.1, 3.0), Quaternion(), 0.5, ANIM_NEG_EXP);
-    }
-  else if( this->leftRight == 1)
-    {
-      this->animation->addKeyFrame(Vector(-2.6, 0.1, -2.5), Quaternion(), 0.0, ANIM_NEG_EXP);
-      this->animation->addKeyFrame(Vector(-3.0, 0.1, -2.5), Quaternion(), 0.1, ANIM_NEG_EXP);
-      this->animation->addKeyFrame(Vector(-2.6, 0.1, -2.5), Quaternion(), 0.5, ANIM_NEG_EXP);
-    }
-  */
 }
 
@@ -143,5 +130,5 @@
   this->localTime = 0;
   
-  this->animation->replay();
+  this->animation1->replay();
 }
 
@@ -190,44 +177,25 @@
 void TestGun::draw () 
 {
-  
-  /* draw gun body 1 */
+  /* draw gun body */
   glMatrixMode(GL_MODELVIEW);
   glPushMatrix();
   float matrix[4][4];
-  
-  if( this->leftRight == 0)
-    {
-      glTranslatef (this->getAbsCoor ().x, 
-		    this->getAbsCoor ().y, 
-		    this->getAbsCoor ().z);
-
-      this->getAbsDir ().matrix (matrix);
-      glMultMatrixf((float*)matrix);
-      this->model->draw(1);
-    }
-  else if( this->leftRight == 1)
-    {
-      glTranslatef (this->getAbsCoor ().x, 
-		    this->getAbsCoor ().y, 
-		    this->getAbsCoor ().z);
-      
-      this->getAbsDir ().matrix (matrix);
-      glMultMatrixf((float*)matrix);
-      glScalef(1.0, 1.0, -1.0);
-      this->model->draw(1);
-    }
-
+  glTranslatef (this->getAbsCoor ().x, 
+		this->getAbsCoor ().y, 
+		this->getAbsCoor ().z);  
+  this->getAbsDir ().matrix (matrix);
+  glMultMatrixf((float*)matrix);
+  if( this->leftRight == W_RIGHT)
+    glScalef(1.0, 1.0, -1.0);
+  this->model->draw(1);
   glPopMatrix();
 
-
-  /* draw gun coil 1 */
+  /* draw objectComponent1: gun coil - animated stuff */
   glMatrixMode(GL_MODELVIEW);
   glPushMatrix();
-  
-  glTranslatef (this->dummy1->getAbsCoor ().x, 
-		this->dummy1->getAbsCoor ().y, 
-		this->dummy1->getAbsCoor ().z);
-  
-  this->dummy1->getAbsDir ().matrix (matrix);
+  glTranslatef (this->objectComponent1->getAbsCoor ().x, 
+		this->objectComponent1->getAbsCoor ().y, 
+		this->objectComponent1->getAbsCoor ().z);
+  this->objectComponent1->getAbsDir ().matrix (matrix);
   glMultMatrixf((float*)matrix);
   this->model->draw(0);
Index: /orxonox/trunk/src/world_entities/test_gun.h
===================================================================
--- /orxonox/trunk/src/world_entities/test_gun.h	(revision 3885)
+++ /orxonox/trunk/src/world_entities/test_gun.h	(revision 3886)
@@ -54,5 +54,4 @@
   Animation3D* animation;
   Vector* projOffset;
-  WorldEntity* dummy1;
   int leftRight;   // this will become an enum
 
Index: /orxonox/trunk/src/world_entities/weapon.h
===================================================================
--- /orxonox/trunk/src/world_entities/weapon.h	(revision 3885)
+++ /orxonox/trunk/src/world_entities/weapon.h	(revision 3886)
@@ -38,4 +38,5 @@
 class Projectile;
 class Weapon;
+class Animation3D;
 
 typedef enum {
@@ -66,4 +67,8 @@
 #define W_CONFIG2 2
 #define W_CONFIG3 3
+
+//! a weapon can be left or right sided
+#define W_LEFT 0
+#define W_RIGHT 1
 
 //! this is a weapon Configuration: it has up to 8 slots
@@ -155,11 +160,22 @@
  protected:
   tList<WorldEntity>* worldEntities;
-  float localTime;
-  float idleTime;
-  float slowDownFactor;
+  float localTime;                 //<! this is the local time. important for shooting attributes like frequency
+  float idleTime;                  //<! the time a weapon needs before it can shoot again. eg. shooting frequency or actication/deactivateion delay
+  float slowDownFactor;            //<! if the shooting frequency is a linear function of time...
+
+  PNode* objectComponent1;         //<! the gun is made of multiple parts, these PNodes represent their location and orientation
+  PNode* objectComponent2;
+  PNode* objectComponent3;
+
+  Animation3D* animation1;
+  Animation3D* animation2;
+  Animation3D* animation3;
+
+  Vector* projectileOffset;
+  int leftRight;   // this will become an enum
 
  private:
-  bool enabled;
-  Projectile* projectile;
+  bool enabled;                    //<! states if the weapon is enabled or not
+  Projectile* projectile;          //<! the projectile used for this weapon
   //WeaponSound sound;
 };
