Index: trunk/src/world_entities/space_ships/helicopter.cc
===================================================================
--- trunk/src/world_entities/space_ships/space_ship.cc	(revision 5994)
+++ trunk/src/world_entities/space_ships/helicopter.cc	(revision 6002)
@@ -10,5 +10,5 @@
 
 ### File Specific:
-   main-programmer: Benjamin Knecht
+   main-programmer: Benjamin Grauer
    co-programmer: ...
 
@@ -17,6 +17,5 @@
 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
 
-#include "executor/executor.h"
-#include "space_ship.h"
+#include "helicopter.h"
 
 #include "objModel.h"
@@ -36,10 +35,10 @@
 using namespace std;
 
-CREATE_FACTORY(SpaceShip, CL_SPACE_SHIP);
+CREATE_FACTORY(Helicopter, CL_HELICOPTER);
 
 /**
  *  creates the controlable Spaceship
  */
-SpaceShip::SpaceShip()
+Helicopter::Helicopter()
 {
   this->init();
@@ -49,5 +48,5 @@
  *  destructs the spaceship, deletes alocated memory
  */
-SpaceShip::~SpaceShip ()
+Helicopter::~Helicopter ()
 {
 }
@@ -57,5 +56,5 @@
  * @param fileName the name of the File to load the spaceship from (absolute path)
  */
-SpaceShip::SpaceShip(const char* fileName)
+Helicopter::Helicopter(const char* fileName)
 {
   this->init();
@@ -64,5 +63,5 @@
   if(!doc.LoadFile())
   {
-    PRINTF(2)("Loading file %s failed for spaceship.\n", fileName);
+    PRINTF(2)("Loading file %s failed for Helicopter.\n", fileName);
     return;
   }
@@ -77,5 +76,5 @@
    @todo add more parameters to load
 */
-SpaceShip::SpaceShip(const TiXmlElement* root)
+Helicopter::Helicopter(const TiXmlElement* root)
 {
   this->init();
@@ -105,10 +104,14 @@
  * initializes a Spaceship
  */
-void SpaceShip::init()
+void Helicopter::init()
 {
 //  this->setRelDir(Quaternion(M_PI, Vector(1,0,0)));
-  this->setClassID(CL_SPACE_SHIP, "SpaceShip");
+  this->setClassID(CL_HELICOPTER, "Helicopter");
 
   PRINTF(4)("SPACESHIP INIT\n");
+
+  this->loadModel("models/ships/helicopter_high.obj", 1.0, 0);
+  this->loadModel("models/ships/helicopter_medium.obj", 1.0, 1);
+  this->loadModel("models/ships/helicopter_low.obj", 1.0, 2);
 
   EventHandler::getInstance()->grabEvents(true);
@@ -177,8 +180,8 @@
 
 /**
- * loads the Settings of a SpaceShip from an XML-element.
+ * loads the Settings of a Helicopter from an XML-element.
  * @param root the XML-element to load the Spaceship's properties from
  */
-void SpaceShip::loadParams(const TiXmlElement* root)
+void Helicopter::loadParams(const TiXmlElement* root)
 {
   static_cast<WorldEntity*>(this)->loadParams(root);
@@ -190,5 +193,5 @@
  * @param weapon to add
 */
-void SpaceShip::addWeapon(Weapon* weapon)
+void Helicopter::addWeapon(Weapon* weapon)
 {
   this->getWeaponManager()->addWeapon(weapon);
@@ -200,5 +203,5 @@
  * @param weapon to remove
 */
-void SpaceShip::removeWeapon(Weapon* weapon)
+void Helicopter::removeWeapon(Weapon* weapon)
 {
   this->getWeaponManager()->removeWeapon(weapon);
@@ -206,7 +209,7 @@
 
 /**
- *  effect that occurs after the SpaceShip is spawned
-*/
-void SpaceShip::postSpawn ()
+ *  effect that occurs after the Helicopter is spawned
+*/
+void Helicopter::postSpawn ()
 {
   //setCollision(new CollisionCluster(1.0, Vector(0,0,0)));
@@ -216,8 +219,7 @@
  *  the action occuring if the spaceship left the game
 */
-void SpaceShip::leftWorld ()
+void Helicopter::leftWorld ()
 {}
 
-WorldEntity* ref = NULL;
 /**
  *  this function is called, when two entities collide
@@ -226,35 +228,14 @@
  * Implement behaviour like damage application or other miscellaneous collision stuff in this function
  */
-void SpaceShip::collidesWith(WorldEntity* entity, const Vector& location)
-{
-  if (entity->isA(CL_TURRET_POWER_UP) && entity != ref)
+void Helicopter::collidesWith(WorldEntity* entity, const Vector& location)
+{
+  if (entity->isA(CL_TURRET_POWER_UP))
   {
     this->ADDWEAPON();
-    ref = entity;
     }
 //  PRINTF(3)("collision %s vs %s @ (%f,%f,%f)\n", this->getClassName(), entity->getClassName(), location.x, location.y, location.z);
 }
 
-/**
- *  draws the spaceship after transforming it.
-*/
-void SpaceShip::draw () const
-{
-  glMatrixMode(GL_MODELVIEW);
-  glPushMatrix();
-  /* translate */
-  glTranslatef (this->getAbsCoor ().x,
-                this->getAbsCoor ().y,
-                this->getAbsCoor ().z);
-  /* rotate */
-  Vector tmpRot = this->getAbsDir().getSpacialAxis();
-  glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
-  this->getModel()->draw();
-  glPopMatrix();
-
-  this->getWeaponManager()->draw();
-
-  //this->debug(0);
-}
+
 
 /**
@@ -262,5 +243,5 @@
  * @param time The timespan passed since last update
 */
-void SpaceShip::tick (float time)
+void Helicopter::tick (float time)
 {
      cycle += time;
@@ -290,5 +271,5 @@
  * @param time the timeslice since the last frame
 */
-void SpaceShip::calculateVelocity (float time)
+void Helicopter::calculateVelocity (float time)
 {
   Vector accel(0.0, 0.0, 0.0);
@@ -372,5 +353,5 @@
  * weapon manipulation by the player
 */
-void SpaceShip::weaponAction()
+void Helicopter::weaponAction()
 {
   if( this->bFire)
@@ -383,5 +364,5 @@
  * @todo switch statement ??
  */
-void SpaceShip::process(const Event &event)
+void Helicopter::process(const Event &event)
 {
 
@@ -412,5 +393,5 @@
 #include "weapons/aiming_turret.h"
 // FIXME THIS MIGHT BE CONSIDERED EITHER A FEATURE, OR A BUG
-void SpaceShip::ADDWEAPON()
+void Helicopter::ADDWEAPON()
 {
   Weapon* turret = NULL;
