Index: branches/world_entities/src/Makefile.am
===================================================================
--- branches/world_entities/src/Makefile.am	(revision 5620)
+++ branches/world_entities/src/Makefile.am	(revision 5621)
@@ -63,4 +63,5 @@
                   world_entities/weapons/turret.cc \
                   world_entities/weapons/aiming_turret.cc \
+                  world_entities/weapons/cannon.cc \
                   world_entities/weapons/test_bullet.cc \
                   world_entities/weapons/rocket.cc \
@@ -97,4 +98,5 @@
                  world_entities/weapons/projectile.h \
                  world_entities/weapons/test_gun.h \
+                 world_entities/weapons/cannon.h \
                  world_entities/weapons/turret.h \
                  world_entities/weapons/aiming_turret.h \
Index: branches/world_entities/src/Makefile.in
===================================================================
--- branches/world_entities/src/Makefile.in	(revision 5620)
+++ branches/world_entities/src/Makefile.in	(revision 5621)
@@ -65,9 +65,9 @@
 	orxonox-weapon.$(OBJEXT) orxonox-projectile.$(OBJEXT) \
 	orxonox-test_gun.$(OBJEXT) orxonox-turret.$(OBJEXT) \
-	orxonox-aiming_turret.$(OBJEXT) orxonox-test_bullet.$(OBJEXT) \
-	orxonox-rocket.$(OBJEXT) orxonox-laser.$(OBJEXT) \
-	orxonox-aim.$(OBJEXT) orxonox-bomb.$(OBJEXT) \
-	orxonox-crosshair.$(OBJEXT) orxonox-power_up.$(OBJEXT) \
-	orxonox-turret_power_up.$(OBJEXT) \
+	orxonox-aiming_turret.$(OBJEXT) orxonox-cannon.$(OBJEXT) \
+	orxonox-test_bullet.$(OBJEXT) orxonox-rocket.$(OBJEXT) \
+	orxonox-laser.$(OBJEXT) orxonox-aim.$(OBJEXT) \
+	orxonox-bomb.$(OBJEXT) orxonox-crosshair.$(OBJEXT) \
+	orxonox-power_up.$(OBJEXT) orxonox-turret_power_up.$(OBJEXT) \
 	orxonox-laser_power_up.$(OBJEXT) orxonox-benchmark.$(OBJEXT)
 orxonox_OBJECTS = $(am_orxonox_OBJECTS)
@@ -259,4 +259,5 @@
                   world_entities/weapons/turret.cc \
                   world_entities/weapons/aiming_turret.cc \
+                  world_entities/weapons/cannon.cc \
                   world_entities/weapons/test_bullet.cc \
                   world_entities/weapons/rocket.cc \
@@ -293,4 +294,5 @@
                  world_entities/weapons/projectile.h \
                  world_entities/weapons/test_gun.h \
+                 world_entities/weapons/cannon.h \
                  world_entities/weapons/turret.h \
                  world_entities/weapons/aiming_turret.h \
@@ -406,4 +408,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox-camera.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox-campaign.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox-cannon.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox-character_attributes.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox-crosshair.Po@am__quote@
@@ -754,4 +757,18 @@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o orxonox-aiming_turret.obj `if test -f 'world_entities/weapons/aiming_turret.cc'; then $(CYGPATH_W) 'world_entities/weapons/aiming_turret.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/weapons/aiming_turret.cc'; fi`
+
+orxonox-cannon.o: world_entities/weapons/cannon.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT orxonox-cannon.o -MD -MP -MF "$(DEPDIR)/orxonox-cannon.Tpo" -c -o orxonox-cannon.o `test -f 'world_entities/weapons/cannon.cc' || echo '$(srcdir)/'`world_entities/weapons/cannon.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/orxonox-cannon.Tpo" "$(DEPDIR)/orxonox-cannon.Po"; else rm -f "$(DEPDIR)/orxonox-cannon.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='world_entities/weapons/cannon.cc' object='orxonox-cannon.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o orxonox-cannon.o `test -f 'world_entities/weapons/cannon.cc' || echo '$(srcdir)/'`world_entities/weapons/cannon.cc
+
+orxonox-cannon.obj: world_entities/weapons/cannon.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT orxonox-cannon.obj -MD -MP -MF "$(DEPDIR)/orxonox-cannon.Tpo" -c -o orxonox-cannon.obj `if test -f 'world_entities/weapons/cannon.cc'; then $(CYGPATH_W) 'world_entities/weapons/cannon.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/weapons/cannon.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/orxonox-cannon.Tpo" "$(DEPDIR)/orxonox-cannon.Po"; else rm -f "$(DEPDIR)/orxonox-cannon.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='world_entities/weapons/cannon.cc' object='orxonox-cannon.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o orxonox-cannon.obj `if test -f 'world_entities/weapons/cannon.cc'; then $(CYGPATH_W) 'world_entities/weapons/cannon.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/weapons/cannon.cc'; fi`
 
 orxonox-test_bullet.o: world_entities/weapons/test_bullet.cc
Index: branches/world_entities/src/defs/class_id.h
===================================================================
--- branches/world_entities/src/defs/class_id.h	(revision 5620)
+++ branches/world_entities/src/defs/class_id.h	(revision 5621)
@@ -136,5 +136,5 @@
   CL_TURRET                     =    0x00000231,
   CL_AIMING_TURRET              =    0x00000232,
-
+  CL_CANNON                     =    0x00000233,
 
   CL_TEST_BULLET                =    0x00000240,
Index: branches/world_entities/src/world_entities/npc.cc
===================================================================
--- branches/world_entities/src/world_entities/npc.cc	(revision 5620)
+++ branches/world_entities/src/world_entities/npc.cc	(revision 5621)
@@ -34,5 +34,8 @@
   this->setClassID(CL_NPC, "NPC");
 
-  this->loadModel("models/ships/bolido.obj", 2);
+  if ((float)rand()/RAND_MAX > .5f)
+    this->loadModel("models/ships/bolido.obj", 2);
+  else
+    this->loadModel("models/ships/gobblin.obj", 2);
 
   this->randomRotAxis =  VECTOR_RAND(1);
Index: branches/world_entities/src/world_entities/npc2.cc
===================================================================
--- branches/world_entities/src/world_entities/npc2.cc	(revision 5620)
+++ branches/world_entities/src/world_entities/npc2.cc	(revision 5621)
@@ -35,5 +35,9 @@
   this->setClassID(CL_NPC, "NPC");
 
-  this->loadModel("models/ships/bolido.obj", 3);
+  if ((float)rand()/RAND_MAX > .5f)
+    this->loadModel("models/ships/bolido.obj", 3);
+  else
+    this->loadModel("models/ships/gobblin.obj", 3);
+
   this->shader = NULL;
   if (likely(Shader::checkShaderAbility()))
Index: branches/world_entities/src/world_entities/player.cc
===================================================================
--- branches/world_entities/src/world_entities/player.cc	(revision 5620)
+++ branches/world_entities/src/world_entities/player.cc	(revision 5621)
@@ -26,4 +26,5 @@
 #include "weapons/test_gun.h"
 #include "weapons/turret.h"
+#include "weapons/cannon.h"
 
 #include "list.h"
@@ -45,13 +46,4 @@
 {
   this->init();
-
-  //weapons:
-  Weapon* wpRight = new TestGun(this->weaponMan, 0);
-  Weapon* wpLeft = new TestGun(this->weaponMan, 1);
-
-  this->weaponMan->addWeapon(wpRight);
-//  this->weaponMan->addWeapon(wpLeft, WM_CONFIG1, WM_SLOT1);
-//  this->weaponMan->addWeapon(wpRight, WM_CONFIG2);
-//  this->weaponMan->addWeapon(wpLeft, WM_CONFIG2);
 }
 
@@ -91,7 +83,11 @@
   Weapon* wpLeft = new TestGun(this->weaponMan, 1);
   wpLeft->setName("testGun Left");
+  Weapon* cannon = new Cannon(this->weaponMan);
+  cannon->setName("BFG");
 
   this->weaponMan->addWeapon(wpLeft, 1, 0);
   this->weaponMan->addWeapon(wpRight,1 ,1);
+  this->weaponMan->addWeapon(cannon, 0, 6);
+
   //this->weaponMan->addWeapon(turret, 3, 0);
 
@@ -133,5 +129,5 @@
 
   this->weaponMan = new WeaponManager(this);
-  this->weaponMan->setSlotCount(6);
+  this->weaponMan->setSlotCount(7);
 
   this->weaponMan->setSlotPosition(0, Vector(-2.6, .1, -3.0));
@@ -153,7 +149,7 @@
   this->weaponMan->setSlotDirection(5, Quaternion(+M_PI_4*.5-M_PI, Vector(1,0,0)));
 //
-//   this->weaponMan->setSlotPosition(6, Vector(-2.0, 0.1, -2.0));
-//   this->weaponMan->setSlotPosition(7, Vector(-2.0, 0.1, 2.0));
-//
+   this->weaponMan->setSlotPosition(6, Vector(-1, 0.0, 0));
+   this->weaponMan->setSlotCapability(6, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+   //
 //   this->weaponMan->setSlotPosition(8, Vector(-2.5, -0.3, -2.0));
 //   this->weaponMan->setSlotDirection(8, Quaternion(-M_PI, Vector(1,0,0)));
Index: branches/world_entities/src/world_entities/weapons/cannon.cc
===================================================================
--- branches/world_entities/src/world_entities/weapons/cannon.cc	(revision 5621)
+++ branches/world_entities/src/world_entities/weapons/cannon.cc	(revision 5621)
@@ -0,0 +1,212 @@
+
+
+/*
+   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:
+
+
+   @todo: direction in which the projectile flights
+   @todo: a target to set/hit
+*/
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WEAPON
+
+#include "cannon.h"
+
+#include "world_entity.h"
+#include "model.h"
+#include "test_bullet.h"
+#include "weapon_manager.h"
+#include "factory.h"
+
+#include "vector.h"
+#include "list.h"
+#include "animation3d.h"
+#include "sound_engine.h"
+
+#include "null_parent.h"
+
+#include "fast_factory.h"
+
+
+using namespace std;
+
+CREATE_FACTORY(Cannon);
+
+/**
+ *  standard constructor
+
+   creates a new weapon
+*/
+Cannon::Cannon (WeaponManager* weaponManager)
+  : Weapon(weaponManager)
+{
+  this->init();
+
+//  this->objectComponent1 = new PNode();
+//  Animation3D* animation1 = this->getAnimation(WS_SHOOTING, this->objectComponent1);
+  Animation3D* animation2 = this->getAnimation(WS_ACTIVATING, this);
+  Animation3D* animation3 = this->getAnimation(WS_DEACTIVATING, this);
+  //parent->addChild(this->objectComponent1, PNODE_ALL);
+//  this->addChild(this->objectComponent1);
+
+//  animation1->setInfinity(ANIM_INF_CONSTANT);
+  animation2->setInfinity(ANIM_INF_CONSTANT);
+  animation3->setInfinity(ANIM_INF_CONSTANT);
+
+    this->setEmissionPoint(3.8, 1.2, 0);
+
+//     animation1->addKeyFrame(Vector(0, -1.5, 0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_NULL);
+//     animation1->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_NULL);
+//     animation1->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.0, ANIM_LINEAR, ANIM_NULL);
+
+    animation2->addKeyFrame(Vector(0.0, -1.0, 0.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_NULL);
+    animation2->addKeyFrame(Vector(0.0, 0.0, 0.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_NULL);
+
+    animation3->addKeyFrame(Vector(0.0, 0.0, 0.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_NULL);
+    animation3->addKeyFrame(Vector(0.0, -1.0, 0.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_NULL);
+}
+
+
+Cannon::Cannon(const TiXmlElement* root)
+{
+  this->init();
+  this->loadParams(root);
+}
+
+/**
+ *  standard deconstructor
+*/
+Cannon::~Cannon ()
+{
+  // model will be deleted from WorldEntity-destructor
+}
+
+
+void Cannon::init()
+{
+  this->setClassID(CL_CANNON, "Cannon");
+
+//  this->model = (Model*)ResourceManager::getInstance()->load("models/guns/test_gun.obj", OBJ, RP_CAMPAIGN);
+
+  this->loadModel("models/guns/cannon.obj");
+
+  this->setStateDuration(WS_SHOOTING, .1);
+  this->setStateDuration(WS_RELOADING, .1);
+  this->setStateDuration(WS_ACTIVATING, .4);
+  this->setStateDuration(WS_DEACTIVATING, .4);
+
+  this->setMaximumEnergy(1000, 100);
+  this->increaseEnergy(1000);
+  //this->minCharge = 2;
+
+  this->setActionSound(WA_SHOOT, "sound/shot1.wav");
+
+  this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+  this->setProjectileType(CL_LASER);
+  this->prepareProjectiles(20);
+
+}
+
+
+void Cannon::loadParams(const TiXmlElement* root)
+{
+
+
+}
+
+
+/**
+ *  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 Cannon::activate()
+{
+}
+
+
+/**
+ *  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 Cannon::deactivate()
+{
+}
+
+
+/**
+ *  fires the weapon
+
+   this is called from the player.cc, when fire-button is been pushed
+   @todo: the ObjectManager deliveres Projectiles not TestBullets! this should be diffrent
+*/
+void Cannon::fire()
+{
+  Projectile* pj =  this->getProjectile();
+  if (pj == NULL)
+    return;
+
+  pj->setParent(NullParent::getInstance());
+
+  pj->setVelocity(this->getVelocity() + this->getAbsDir().apply(Vector(1,0,0))*50+VECTOR_RAND(5));
+
+  pj->setAbsCoor(this->getEmissionPoint());
+  pj->setAbsDir(this->getAbsDir());
+  pj->activate();
+}
+
+/**
+ *  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 Cannon::destroy ()
+{}
+
+/**
+ *  this will draw the weapon
+*/
+void Cannon::draw () const
+{
+  /* draw gun body */
+  glMatrixMode(GL_MODELVIEW);
+  glPushMatrix();
+  glTranslatef (this->getAbsCoor ().x,
+                this->getAbsCoor ().y,
+                this->getAbsCoor ().z);
+
+  Vector tmpRot = this->getAbsDir().getSpacialAxis();
+  glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
+
+  this->model->draw();
+  glPopMatrix();
+
+  /* draw objectComponent1: gun coil - animated stuff */
+/*  glMatrixMode(GL_MODELVIEW);
+  glPushMatrix();
+  glTranslatef (this->objectComponent1->getAbsCoor ().x,
+                this->objectComponent1->getAbsCoor ().y,
+                this->objectComponent1->getAbsCoor ().z);
+  tmpRot = this->objectComponent1->getAbsDir().getSpacialAxis();
+  glRotatef (this->objectComponent1->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
+  this->model->draw(0);
+
+  glPopMatrix();*/
+}
+
Index: branches/world_entities/src/world_entities/weapons/cannon.h
===================================================================
--- branches/world_entities/src/world_entities/weapons/cannon.h	(revision 5621)
+++ branches/world_entities/src/world_entities/weapons/cannon.h	(revision 5621)
@@ -0,0 +1,33 @@
+/*!
+ * @file cannon.h
+ * a weapon that is fix on top of the player to fire heavy weaponary.
+*/
+
+
+#ifndef _CANNON_H
+#define _CANNON_H
+
+#include "weapon.h"
+
+class Cannon : public Weapon
+  {
+  public:
+    Cannon (WeaponManager* weaponManager);
+    Cannon (const TiXmlElement* root);
+    virtual ~Cannon ();
+
+    void init();
+    void loadParams(const TiXmlElement* root);
+
+    virtual void activate();
+    virtual void deactivate();
+
+    virtual void fire();
+    virtual void destroy();
+
+    virtual void draw() const;
+
+  private:
+//     PNode* objectComponent1;         //<! the gun is made of multiple parts, these PNodes represent their location and orientation
+  };
+#endif /* _CANNON_H */
