Index: code/branches/input/src/orxonox/objects/Ambient.cc
===================================================================
--- code/branches/input/src/orxonox/objects/Ambient.cc	(revision 1546)
+++ code/branches/input/src/orxonox/objects/Ambient.cc	(revision 1629)
@@ -73,27 +73,10 @@
       
     }
-    
-    void Ambient::loadParams(TiXmlElement* xmlElem)
+
+    void Ambient::setAmbientLight(const ColourValue& colour)
     {
-    	if (xmlElem->Attribute("colourvalue"))
-    	{
-        SubString colourvalues(xmlElem->Attribute("colourvalue"), ',');
-
-	    	float r, g, b;
-        convertValue<std::string, float>(&r, colourvalues[0]);
-        convertValue<std::string, float>(&g, colourvalues[1]);
-        convertValue<std::string, float>(&b, colourvalues[2]);
-
-	    	this->setAmbientLight(ColourValue(r, g, b));
-
-	    	COUT(4) << "Loader: Set ambient light: "<<r<<" " << g << " " << b  << std::endl << std::endl;
-    	}
-   }
-
-   void Ambient::setAmbientLight(const ColourValue& colour)
-   {
-    	GraphicsEngine::getSingleton().getSceneManager()->setAmbientLight(colour);
+	    GraphicsEngine::getSingleton().getSceneManager()->setAmbientLight(colour);
       ambientLight_=colour;	
-   }
+    }
 
     /**
Index: code/branches/input/src/orxonox/objects/Ambient.h
===================================================================
--- code/branches/input/src/orxonox/objects/Ambient.h	(revision 1546)
+++ code/branches/input/src/orxonox/objects/Ambient.h	(revision 1629)
@@ -44,5 +44,4 @@
             virtual ~Ambient();
 
-            void loadParams(TiXmlElement* xmlElem);
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
             void setAmbientLight(const ColourValue& colour);
Index: code/branches/input/src/orxonox/objects/Backlight.cc
===================================================================
--- code/branches/input/src/orxonox/objects/Backlight.cc	(revision 1629)
+++ code/branches/input/src/orxonox/objects/Backlight.cc	(revision 1629)
@@ -0,0 +1,154 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   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
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+#include "Backlight.h"
+
+#include <OgreBillboard.h>
+#include <OgreRibbonTrail.h>
+
+#include "core/CoreIncludes.h"
+#include "core/ConfigValueIncludes.h"
+#include "core/Executor.h"
+#include "util/Math.h"
+#include "GraphicsEngine.h"
+#include "Orxonox.h"
+
+namespace orxonox
+{
+    CreateFactory(Backlight);
+
+    float Backlight::timeFactor_s = 1.0;
+
+    Backlight::Backlight(float maxspeed, float brakingtime, float scale)
+    {
+        RegisterObject(Backlight);
+
+        this->setConfigValues();
+        this->traillength_ = 1;
+
+        this->getNode()->setInheritScale(false);
+
+        this->billboard_.setBillboardSet("Flares/backlightflare");
+        this->attachObject(this->billboard_.getBillboardSet());
+
+        this->ribbonTrail_ = GraphicsEngine::getSingleton().getSceneManager()->createRibbonTrail(this->getName() + "RibbonTrail");
+        this->ribbonTrailNode_ = GraphicsEngine::getSingleton().getSceneManager()->getRootSceneNode()->createChildSceneNode(this->getName() + "RibbonTrailNode");
+        this->ribbonTrailNode_->attachObject(this->ribbonTrail_);
+        this->ribbonTrail_->addNode(this->getNode());
+
+        this->configure(maxspeed, brakingtime, scale);
+
+        this->ribbonTrail_->setTrailLength(this->maxTraillength_);
+        this->ribbonTrail_->setMaterialName("Trail/backlighttrail");
+
+        this->setTimeFactor(Orxonox::getSingleton()->getTimeFactor());
+    }
+
+    Backlight::~Backlight()
+    {
+        if (this->isInitialized())
+        {
+            this->detachObject(this->billboard_.getBillboardSet());
+            GraphicsEngine::getSingleton().getSceneManager()->destroySceneNode(this->getName() + "RibbonTrailNode");
+            GraphicsEngine::getSingleton().getSceneManager()->destroyRibbonTrail(this->ribbonTrail_);
+        }
+    }
+
+    void Backlight::setConfigValues()
+    {
+        SetConfigValue(maxLifeTime_, 4.0).description("The maximal amount of seconds the trail behind a SpaceShip stays visible");
+        SetConfigValue(trailSegmentLength_, 50).description("The length of one segment of the trail behind a SpaceShip (lower values make it more smooth)");
+        SetConfigValue(width_, 7.0).description("The width of the trail");
+    }
+
+    void Backlight::setTimeFactor(float factor)
+    {
+        Backlight::timeFactor_s = factor;
+        float change = Backlight::timeFactor_s / this->maxLifeTime_;
+        this->ribbonTrail_->setWidthChange(0, this->width_ * change);
+        this->updateColourChange();
+    }
+
+    void Backlight::updateColourChange()
+    {
+        this->ribbonTrail_->setColourChange(0, ColourValue(0, 0, 0, this->maxTraillength_ / this->traillength_ / this->maxLifeTime_ * Backlight::timeFactor_s));
+    }
+
+    void Backlight::tick(float dt)
+    {
+        WorldEntity::tick(dt);
+
+        if (this->isActive())
+        {
+            if (this->traillength_ < this->maxTraillength_)
+            {
+                this->traillength_ = min<float>(this->maxTraillength_, this->traillength_ + dt * this->maxTraillength_ / this->maxLifeTime_);
+                this->updateColourChange();
+            }
+        }
+        else
+        {
+            if (this->traillength_ > 1)
+            {
+                this->traillength_ = max<float>(1, this->traillength_ - this->brakefactor_ * dt * this->maxTraillength_ / this->maxLifeTime_);
+                this->updateColourChange();
+            }
+        }
+
+        this->ribbonTrail_->setTrailLength(this->traillength_);
+    }
+
+    void Backlight::setColour(const ColourValue& colour)
+    {
+        this->billboard_.getBillboardSet()->getBillboard(0)->setColour(colour);
+        this->ribbonTrail_->setInitialColour(0, ColourValue(colour.r / 4 + 0.75, colour.g / 4 + 0.75, colour.b / 4 + 0.75));
+    }
+
+    void Backlight::configure(float maxspeed, float brakingtime, float scale)
+    {
+        this->maxTraillength_ = this->maxLifeTime_ * maxspeed;
+        this->maxTrailsegments_ = (size_t)(this->maxTraillength_ / this->trailSegmentLength_);
+        this->ribbonTrail_->setMaxChainElements(this->maxTrailsegments_);
+        this->ribbonTrail_->setTrailLength(this->traillength_ = 2 * this->maxTrailsegments_);
+
+        this->brakefactor_ = this->maxLifeTime_ / brakingtime;
+
+        this->scale(scale);
+        this->ribbonTrail_->setInitialWidth(0, this->width_ * scale);
+        this->ribbonTrail_->setWidthChange(0, this->width_ * scale / this->maxLifeTime_ * Backlight::timeFactor_s);
+    }
+
+    void Backlight::changedVisibility()
+    {
+        WorldEntity::changedVisibility();
+
+        this->billboard_.setVisible(this->isVisible());
+        this->ribbonTrail_->setVisible(this->isVisible());
+    }
+}
Index: code/branches/input/src/orxonox/objects/Backlight.h
===================================================================
--- code/branches/input/src/orxonox/objects/Backlight.h	(revision 1629)
+++ code/branches/input/src/orxonox/objects/Backlight.h	(revision 1629)
@@ -0,0 +1,75 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   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
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _Backlight_H__
+#define _Backlight_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "WorldEntity.h"
+#include "tools/Timer.h"
+#include "tools/BillboardSet.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport Backlight : public WorldEntity
+    {
+        public:
+            Backlight(float maxspeed = 1.0, float brakingtime = 1.0, float scale = 1.0);
+            virtual ~Backlight();
+
+            void setConfigValues();
+            virtual void tick(float dt);
+            virtual void changedVisibility();
+
+            void setColour(const ColourValue& colour);
+            void setTimeFactor(float factor);
+
+        private:
+            void configure(float maxspeed, float brakingtime, float scale = 1);
+            void updateColourChange();
+
+            static float timeFactor_s;
+            BillboardSet billboard_;
+            Ogre::SceneNode* ribbonTrailNode_;
+            Ogre::RibbonTrail* ribbonTrail_;
+
+            float maxLifeTime_;
+            float trailSegmentLength_;
+            float width_;
+
+            float brakefactor_;
+
+            float maxTraillength_;
+            float traillength_;
+
+            size_t maxTrailsegments_;
+    };
+}
+
+#endif /* _Backlight_H__ */
Index: code/branches/input/src/orxonox/objects/BillboardProjectile.cc
===================================================================
--- code/branches/input/src/orxonox/objects/BillboardProjectile.cc	(revision 1629)
+++ code/branches/input/src/orxonox/objects/BillboardProjectile.cc	(revision 1629)
@@ -0,0 +1,68 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   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
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+#include "BillboardProjectile.h"
+
+#include <OgreBillboard.h>
+
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+    CreateFactory(BillboardProjectile);
+
+    BillboardProjectile::BillboardProjectile(SpaceShip* owner) : Projectile(owner)
+    {
+        RegisterObject(BillboardProjectile);
+
+        if (this->owner_)
+        {
+            this->billboard_.setBillboardSet("Examples/Flare", ColourValue(1.0, 1.0, 0.5), 1);
+            this->attachObject(this->billboard_.getBillboardSet());
+            this->scale(0.5);
+        }
+    }
+
+    BillboardProjectile::~BillboardProjectile()
+    {
+        if (this->isInitialized() && this->owner_)
+            this->detachObject(this->billboard_.getBillboardSet());
+    }
+
+    void BillboardProjectile::setColour(const ColourValue& colour)
+    {
+        this->billboard_.getBillboardSet()->getBillboard(0)->setColour(colour);
+    }
+
+    void BillboardProjectile::changedVisibility()
+    {
+        Projectile::changedVisibility();
+        this->billboard_.setVisible(this->isVisible());
+    }
+}
Index: code/branches/input/src/orxonox/objects/BillboardProjectile.h
===================================================================
--- code/branches/input/src/orxonox/objects/BillboardProjectile.h	(revision 1629)
+++ code/branches/input/src/orxonox/objects/BillboardProjectile.h	(revision 1629)
@@ -0,0 +1,54 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   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
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _BillboardProjectile_H__
+#define _BillboardProjectile_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "Projectile.h"
+#include "tools/BillboardSet.h"
+#include "util/Math.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport BillboardProjectile : public Projectile
+    {
+        public:
+            BillboardProjectile(SpaceShip* owner = 0);
+            virtual ~BillboardProjectile();
+
+            virtual void setColour(const ColourValue& colour);
+            virtual void changedVisibility();
+
+        private:
+            BillboardSet billboard_;
+    };
+}
+
+#endif /* _BillboardProjectile_H__ */
Index: code/branches/input/src/orxonox/objects/Explosion.cc
===================================================================
--- code/branches/input/src/orxonox/objects/Explosion.cc	(revision 1546)
+++ 	(revision )
@@ -1,92 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "OrxonoxStableHeaders.h"
-#include "Explosion.h"
-
-#include <OgreParticleSystem.h>
-#include <OgreSceneManager.h>
-#include <OgreSceneNode.h>
-
-#include "core/CoreIncludes.h"
-#include "core/Executor.h"
-
-#include "util/Math.h"
-#include "GraphicsEngine.h"
-#include "particle/ParticleInterface.h"
-
-namespace orxonox
-{
-    CreateFactory(Explosion);
-
-    Explosion::Explosion(WorldEntity* owner) :
-      lifetime_(0.4),
-      particle_(0)
-    {
-        RegisterObject(Explosion);
-
-        if (owner)
-        {
-            this->destroyTimer_.setTimer(this->lifetime_, false, this, createExecutor(createFunctor(&Explosion::destroyObject)));
-
-            Vector3 position = owner->getNode()->getWorldPosition();
-
-            this->particle_ = new ParticleInterface(GraphicsEngine::getSingleton().getSceneManager(), "explosion" + this->getName(), "Orxonox/treibwerk");
-            this->particle_->getParticleSystem()->setParameter("local_space", "true");
-            this->particle_->newEmitter();
-            this->particle_->setPositionOfEmitter(0, Vector3::ZERO);
-            this->particle_->setPositionOfEmitter(1, Vector3::ZERO);
-            this->particle_->setColour(ColourValue(1.0, 0.8, 0.2));
-
-            this->setPosition(position);
-            this->scale(2);
-
-            this->particle_->addToSceneNode(this->getNode());
-        }
-    }
-
-    Explosion::~Explosion()
-    {
-        if (this->particle_)
-        {
-            this->particle_->detachFromSceneNode();
-            delete this->particle_;
-        }
-    };
-    
-    /*bool Explosion::create(){
-      if(!WorldEntity::create())
-        return false;
-      classID=this->getIdentifier()->getNetworkID();
-    }*/
-
-    void Explosion::destroyObject()
-    {
-        delete this;
-    }
-}
Index: code/branches/input/src/orxonox/objects/Explosion.h
===================================================================
--- code/branches/input/src/orxonox/objects/Explosion.h	(revision 1546)
+++ 	(revision )
@@ -1,54 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _Explosion_H__
-#define _Explosion_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include "WorldEntity.h"
-#include "../tools/Timer.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport Explosion : public WorldEntity
-    {
-        public:
-            Explosion(WorldEntity* owner = 0);
-            virtual ~Explosion();
-            void destroyObject();
-            virtual bool create(){return WorldEntity::create();}
-
-        private:
-            Timer<Explosion> destroyTimer_;
-            float lifetime_;
-            ParticleInterface* particle_;
-    };
-}
-
-#endif /* _Explosion_H__ */
Index: code/branches/input/src/orxonox/objects/Model.cc
===================================================================
--- code/branches/input/src/orxonox/objects/Model.cc	(revision 1546)
+++ code/branches/input/src/orxonox/objects/Model.cc	(revision 1629)
@@ -53,10 +53,11 @@
     Model::~Model()
     {
+        if (this->isInitialized() && (this->meshSrc_ != "") && (this->meshSrc_.size() > 0))
+            this->detachObject(this->mesh_.getEntity());
     }
 
     /**
         @brief XML loading and saving.
-    @p
-    aram xmlelement The XML-element
+        @param xmlelement The XML-element
         @param loading Loading (true) or saving (false)
         @return The XML-element
@@ -94,3 +95,10 @@
       registerVar(&meshSrc_, meshSrc_.length() + 1, network::STRING);
     }
+
+    void Model::changedVisibility()
+    {
+        WorldEntity::changedVisibility();
+        if (this->isInitialized())
+            this->mesh_.setVisible(this->isVisible());
+    }
 }
Index: code/branches/input/src/orxonox/objects/Model.h
===================================================================
--- code/branches/input/src/orxonox/objects/Model.h	(revision 1546)
+++ code/branches/input/src/orxonox/objects/Model.h	(revision 1629)
@@ -44,4 +44,5 @@
             virtual ~Model();
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void changedVisibility();
             void setMesh(const std::string& meshname);
             virtual bool create();
Index: code/branches/input/src/orxonox/objects/NPC.cc
===================================================================
--- code/branches/input/src/orxonox/objects/NPC.cc	(revision 1546)
+++ code/branches/input/src/orxonox/objects/NPC.cc	(revision 1629)
@@ -45,9 +45,4 @@
   NPC::~NPC()
   {
-  }
-
-  void NPC::loadParams(TiXmlElement* xmlElem)
-  {
-    Model::loadParams(xmlElem);
   }
 
Index: code/branches/input/src/orxonox/objects/NPC.h
===================================================================
--- code/branches/input/src/orxonox/objects/NPC.h	(revision 1546)
+++ code/branches/input/src/orxonox/objects/NPC.h	(revision 1629)
@@ -48,5 +48,4 @@
       NPC();
       virtual ~NPC();
-      virtual void loadParams(TiXmlElement* xmlElem);
       void tick(float dt);
       void update();
Index: code/branches/input/src/orxonox/objects/ParticleProjectile.cc
===================================================================
--- code/branches/input/src/orxonox/objects/ParticleProjectile.cc	(revision 1629)
+++ code/branches/input/src/orxonox/objects/ParticleProjectile.cc	(revision 1629)
@@ -0,0 +1,67 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   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
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+#include "ParticleProjectile.h"
+
+#include "SpaceShip.h"
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+    CreateFactory(ParticleProjectile);
+
+    ParticleProjectile::ParticleProjectile(SpaceShip* owner) : BillboardProjectile(owner)
+    {
+        RegisterObject(ParticleProjectile);
+
+        if (this->owner_)
+        {
+            this->particles_ = new ParticleInterface("Orxonox/shot2", LODParticle::normal);
+            this->particles_->addToSceneNode(this->getNode());
+            this->particles_->getAllEmitters()->setDirection(-this->owner_->getInitialDir());
+            this->particles_->setKeepParticlesInLocalSpace(true);
+        }
+        else
+        {
+            this->particles_ = 0;
+        }
+    }
+
+    ParticleProjectile::~ParticleProjectile()
+    {
+        if (this->isInitialized() && this->particles_)
+            delete this->particles_;
+    }
+
+    void ParticleProjectile::changedVisibility()
+    {
+        BillboardProjectile::changedVisibility();
+        this->particles_->setEnabled(this->isVisible());
+    }
+}
Index: code/branches/input/src/orxonox/objects/ParticleProjectile.h
===================================================================
--- code/branches/input/src/orxonox/objects/ParticleProjectile.h	(revision 1629)
+++ code/branches/input/src/orxonox/objects/ParticleProjectile.h	(revision 1629)
@@ -0,0 +1,52 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   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
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _ParticleProjectile_H__
+#define _ParticleProjectile_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "BillboardProjectile.h"
+#include "tools/ParticleInterface.h"
+#include "util/Math.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport ParticleProjectile : public BillboardProjectile
+    {
+        public:
+            ParticleProjectile(SpaceShip* owner = 0);
+            virtual ~ParticleProjectile();
+            virtual void changedVisibility();
+
+        private:
+            ParticleInterface* particles_;
+    };
+}
+
+#endif /* _ParticleProjectile_H__ */
Index: code/branches/input/src/orxonox/objects/ParticleSpawner.cc
===================================================================
--- code/branches/input/src/orxonox/objects/ParticleSpawner.cc	(revision 1629)
+++ code/branches/input/src/orxonox/objects/ParticleSpawner.cc	(revision 1629)
@@ -0,0 +1,105 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   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
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+#include "ParticleSpawner.h"
+
+#include "core/CoreIncludes.h"
+#include "core/Executor.h"
+#include "tools/ParticleInterface.h"
+#include "GraphicsEngine.h"
+
+namespace orxonox
+{
+    CreateFactory(ParticleSpawner);
+
+    ParticleSpawner::ParticleSpawner()
+    {
+        RegisterObject(ParticleSpawner);
+        this->particle_ = 0;
+    }
+
+    ParticleSpawner::ParticleSpawner(const std::string& templateName, LODParticle::LOD detaillevel, float lifetime, float startdelay, float destroydelay, const Vector3& direction)
+    {
+        RegisterObject(ParticleSpawner);
+        this->setParticle(templateName, detaillevel, lifetime, startdelay, destroydelay, direction);
+    }
+
+    void ParticleSpawner::setParticle(const std::string& templateName, LODParticle::LOD detaillevel, float lifetime, float startdelay, float destroydelay, const Vector3& direction)
+    {
+        ExecutorMember<ParticleSpawner>* executor = createExecutor(createFunctor(&ParticleSpawner::createParticleSpawner));
+        this->destroydelay_ = destroydelay;
+        executor->setDefaultValues(lifetime);
+        this->timer_.setTimer(startdelay, false, this, executor);
+        this->particle_ = new ParticleInterface(templateName, detaillevel);
+        this->particle_->addToSceneNode(this->getNode());
+        this->particle_->setEnabled(false);
+        if (direction != Vector3::ZERO)
+        {
+            this->particle_->getAllEmitters()->setDirection(direction);
+        }
+    }
+
+    ParticleSpawner::~ParticleSpawner()
+    {
+        if (this->isInitialized() && this->particle_)
+        {
+            this->particle_->detachFromSceneNode();
+            delete this->particle_;
+        }
+    };
+
+    void ParticleSpawner::destroy()
+    {
+        this->setPosition(this->getNode()->getParent()->getPosition());
+        this->getNode()->getParent()->removeChild(this->getNode());
+        GraphicsEngine::getSingleton().getSceneManager()->getRootSceneNode()->addChild(this->getNode());
+        if (this->particle_)
+            this->particle_->setEnabled(false);
+        if (!this->timer_.isActive() || this->timer_.getRemainingTime() > this->destroydelay_)
+            this->timer_.setTimer(this->destroydelay_, false, this, createExecutor(createFunctor(&ParticleSpawner::destroyParticleSpawner)));
+    }
+
+    void ParticleSpawner::createParticleSpawner(float lifetime)
+    {
+        this->particle_->setEnabled(true);
+        if (lifetime != 0)
+            this->timer_.setTimer(lifetime, false, this, createExecutor(createFunctor(&ParticleSpawner::destroyParticleSpawner)));
+    }
+
+    void ParticleSpawner::destroyParticleSpawner()
+    {
+        delete this;
+    }
+
+    void ParticleSpawner::setVisible(bool visible)
+    {
+        if (this->particle_)
+            this->particle_->setEnabled(visible);
+    }
+}
Index: code/branches/input/src/orxonox/objects/ParticleSpawner.h
===================================================================
--- code/branches/input/src/orxonox/objects/ParticleSpawner.h	(revision 1629)
+++ code/branches/input/src/orxonox/objects/ParticleSpawner.h	(revision 1629)
@@ -0,0 +1,63 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   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
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _ParticleSpawner_H__
+#define _ParticleSpawner_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "WorldEntity.h"
+#include "tools/Timer.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport ParticleSpawner : public WorldEntity
+    {
+        public:
+            ParticleSpawner();
+            ParticleSpawner(const std::string& templateName, LODParticle::LOD detaillevel, float lifetime = 0, float startdelay = 0, float destroydelay = 0, const Vector3& direction = Vector3::ZERO);
+            virtual ~ParticleSpawner();
+            void destroy();
+
+            void setParticle(const std::string& templateName, LODParticle::LOD detaillevel, float lifetime = 0, float startdelay = 0, float destroydelay = 0, const Vector3& direction = Vector3::ZERO);
+            inline ParticleInterface* getParticleInterface() const
+                { return this->particle_; }
+
+            void setVisible(bool visible);
+
+        private:
+            void createParticleSpawner(float lifetime);
+            void destroyParticleSpawner();
+
+            Timer<ParticleSpawner> timer_;
+            ParticleInterface* particle_;
+            float destroydelay_;
+    };
+}
+
+#endif /* _ParticleSpawner_H__ */
Index: code/branches/input/src/orxonox/objects/Projectile.cc
===================================================================
--- code/branches/input/src/orxonox/objects/Projectile.cc	(revision 1546)
+++ code/branches/input/src/orxonox/objects/Projectile.cc	(revision 1629)
@@ -35,25 +35,21 @@
 #include "core/Executor.h"
 #include "core/ConfigValueIncludes.h"
+#include "tools/ParticleInterface.h"
 
-#include "SpaceShip.h"
-#include "Explosion.h"
+#include "SpaceShipAI.h"
+#include "ParticleSpawner.h"
 #include "Model.h"
 
 namespace orxonox
 {
-    CreateFactory(Projectile);
+    float Projectile::speed_ = 5000;
 
-    float Projectile::speed_ = 0;
-
-    Projectile::Projectile(SpaceShip* owner) :
-      owner_(owner)
+    Projectile::Projectile(SpaceShip* owner) : owner_(owner)
     {
         RegisterObject(Projectile);
 
         this->setConfigValues();
-
-        this->billboard_.setBillboardSet("Examples/Flare", ColourValue(1.0, 1.0, 0.5), 1);
-        this->attachObject(this->billboard_.getBillboardSet());
-        this->scale(0.5);
+        this->explosionTemplateName_ = "Orxonox/explosion3";
+        this->smokeTemplateName_ = "Orxonox/smoke4";
 
         if (this->owner_)
@@ -63,9 +59,8 @@
             this->setPosition(this->owner_->getPosition());
             this->translate(Vector3(55, 0, 0), Ogre::Node::TS_LOCAL);
-            this->setVelocity(Vector3(1, 0, 0) * this->speed_);
+            this->setVelocity(this->owner_->getInitialDir() * this->speed_);
         }
 
         this->destroyTimer_.setTimer(this->lifetime_, false, this, createExecutor(createFunctor(&Projectile::destroyObject)));
-//        COUT(3) << this->classID << std::endl;
     }
 
@@ -76,8 +71,10 @@
     void Projectile::setConfigValues()
     {
-        SetConfigValue(lifetime_, 10.0).description("The time in seconds a projectile stays alive");
-        SetConfigValue(speed_, 2000.0).description("The speed of a projectile in units per second");
+        SetConfigValue(damage_, 15.0).description("The damage caused by the projectile");
+        SetConfigValue(lifetime_, 4.0).description("The time in seconds a projectile stays alive");
+        SetConfigValue(speed_, 5000.0).description("The speed of a projectile in units per second");
 
-        this->setVelocity(Vector3(1, 0, 0) * this->speed_);
+	if(this->owner_)
+          this->setVelocity(this->owner_->getInitialDir() * this->speed_);
     }
 
@@ -85,4 +82,7 @@
     {
         WorldEntity::tick(dt);
+
+        if (!this->isActive())
+            return;
 
         float radius;
@@ -95,6 +95,14 @@
                 if (this->getPosition().squaredDistance(it->getPosition()) <= (radius*radius))
                 {
-                    Explosion *exp = new Explosion(this);
-                    exp->create();
+                    // hit
+                    if (it->isA(Class(SpaceShipAI)))
+                        ((SpaceShipAI*)(*it))->damage(this->damage_);
+                    ParticleSpawner* explosion = new ParticleSpawner(this->explosionTemplateName_, LODParticle::low, 2.0);
+                    explosion->setPosition(this->getPosition());
+                    explosion->create();
+                    ParticleSpawner* smoke = new ParticleSpawner(this->smokeTemplateName_, LODParticle::normal, 2.0, 0.0);
+                    smoke->setPosition(this->getPosition());
+//                    smoke->getParticleInterface()->setSpeedFactor(3.0);
+                    smoke->create();
                     delete this;
                     return;
@@ -108,8 +116,3 @@
         delete this;
     }
-
-    void Projectile::setColour(const ColourValue& colour)
-    {
-        this->billboard_.getBillboardSet()->getBillboard(0)->setColour(colour);
-    }
 }
Index: code/branches/input/src/orxonox/objects/Projectile.h
===================================================================
--- code/branches/input/src/orxonox/objects/Projectile.h	(revision 1546)
+++ code/branches/input/src/orxonox/objects/Projectile.h	(revision 1629)
@@ -33,7 +33,5 @@
 
 #include "WorldEntity.h"
-#include "../tools/BillboardSet.h"
-#include "../tools/Timer.h"
-#include "util/Math.h"
+#include "tools/Timer.h"
 
 namespace orxonox
@@ -42,11 +40,8 @@
     {
         public:
-            Projectile(SpaceShip* owner = 0);
             virtual ~Projectile();
             void setConfigValues();
             void destroyObject();
             virtual void tick(float dt);
-            virtual bool create(){return WorldEntity::create();}
-            void setColour(const ColourValue& colour);
 
             static float getSpeed()
@@ -54,10 +49,13 @@
 
         protected:
+            Projectile(SpaceShip* owner = 0);
             SpaceShip* owner_;
 
         private:
-            BillboardSet billboard_;
+            std::string explosionTemplateName_;
+            std::string smokeTemplateName_;
             static float speed_;
             float lifetime_;
+            float damage_;
             Timer<Projectile> destroyTimer_;
     };
Index: code/branches/input/src/orxonox/objects/RotatingProjectile.cc
===================================================================
--- code/branches/input/src/orxonox/objects/RotatingProjectile.cc	(revision 1546)
+++ code/branches/input/src/orxonox/objects/RotatingProjectile.cc	(revision 1629)
@@ -37,5 +37,5 @@
     CreateFactory(RotatingProjectile);
 
-    RotatingProjectile::RotatingProjectile(SpaceShip* owner) : Projectile(owner)
+    RotatingProjectile::RotatingProjectile(SpaceShip* owner) : BillboardProjectile(owner)
     {
         RegisterObject(RotatingProjectile);
@@ -73,10 +73,20 @@
     void RotatingProjectile::tick(float dt)
     {
-        this->time_ += dt;
+        if (this->isActive())
+        {
+            this->time_ += dt;
 
-        this->rotatingNode1_->setPosition(0, 50 * sin(this->time_ * 20), 50 * cos(this->time_ * 20));
-        this->rotatingNode2_->setPosition(0, -50 * sin(this->time_ * 20), -50 * cos(this->time_ * 20));
+            this->rotatingNode1_->setPosition(0, 50 * sin(this->time_ * 20), 50 * cos(this->time_ * 20));
+            this->rotatingNode2_->setPosition(0, -50 * sin(this->time_ * 20), -50 * cos(this->time_ * 20));
+        }
 
         Projectile::tick(dt);
     }
+
+    void RotatingProjectile::changedVisibility()
+    {
+        BillboardProjectile::changedVisibility();
+        this->rotatingBillboard1_.setVisible(this->isVisible());
+        this->rotatingBillboard2_.setVisible(this->isVisible());
+    }
 }
Index: code/branches/input/src/orxonox/objects/RotatingProjectile.h
===================================================================
--- code/branches/input/src/orxonox/objects/RotatingProjectile.h	(revision 1546)
+++ code/branches/input/src/orxonox/objects/RotatingProjectile.h	(revision 1629)
@@ -2,11 +2,11 @@
 #define _RotatingProjectile_H__
 
-#include "../OrxonoxPrereqs.h"
+#include "OrxonoxPrereqs.h"
 #include "util/Math.h"
-#include "Projectile.h"
+#include "BillboardProjectile.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport RotatingProjectile : public Projectile/*, public network::Synchronisable*/
+    class _OrxonoxExport RotatingProjectile : public BillboardProjectile
     {
         public:
@@ -15,5 +15,5 @@
             void setConfigValues();
             virtual void tick(float dt);
-            virtual bool create(){return Projectile::create();}
+            virtual void changedVisibility();
 
         private:
Index: code/branches/input/src/orxonox/objects/Skybox.cc
===================================================================
--- code/branches/input/src/orxonox/objects/Skybox.cc	(revision 1546)
+++ code/branches/input/src/orxonox/objects/Skybox.cc	(revision 1629)
@@ -54,24 +54,14 @@
     }
 
-    void Skybox::loadParams(TiXmlElement* xmlElem)
+    void Skybox::setSkybox(const std::string& skyboxname)
     {
-    	if (xmlElem->Attribute("src"))
-    	{
-    		skyboxSrc_ = xmlElem->Attribute("src");
-        this->create();
+    	GraphicsEngine::getSingleton().getSceneManager()->setSkyBox(true, skyboxname);
+    }
 
-	    	COUT(4) << "Loader: Set skybox: "<< skyboxSrc_ << std::endl << std::endl;
-    	}
-   }
+    void Skybox::setSkyboxSrc(const std::string& src)
+    {
+        this->skyboxSrc_ = src;
+    }
 
-   void Skybox::setSkybox(const std::string& skyboxname)
-   {
-    	GraphicsEngine::getSingleton().getSceneManager()->setSkyBox(true, skyboxname);
-   }
-
-   void Skybox::setSkyboxSrc(const std::string& src){
-     skyboxSrc_ = src;
-   }
-   
     /**
         @brief XML loading and saving.
@@ -87,13 +77,20 @@
         create();
     }
-    
-    bool Skybox::create(){
-      this->setSkybox(skyboxSrc_);
-      return Synchronisable::create();
+
+    bool Skybox::create()
+    {
+        this->setSkybox(this->skyboxSrc_);
+        return Synchronisable::create();
     }
-    
-    void Skybox::registerAllVariables(){
-      registerVar(&skyboxSrc_, skyboxSrc_.length()+1 ,network::STRING);
+
+    void Skybox::registerAllVariables()
+    {
+        registerVar(&skyboxSrc_, skyboxSrc_.length()+1 ,network::STRING);
     }
-    
+
+    void Skybox::changedVisibility()
+    {
+        BaseObject::changedVisibility();
+        GraphicsEngine::getSingleton().getSceneManager()->setSkyBox(this->isVisible(), this->skyboxSrc_);
+    }
 }
Index: code/branches/input/src/orxonox/objects/Skybox.h
===================================================================
--- code/branches/input/src/orxonox/objects/Skybox.h	(revision 1546)
+++ code/branches/input/src/orxonox/objects/Skybox.h	(revision 1629)
@@ -43,8 +43,8 @@
             virtual ~Skybox();
 
-            void loadParams(TiXmlElement* xmlElem);
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void changedVisibility();
             void setSkybox(const std::string& skyboxname);
-            
+
             virtual bool create();
             void registerAllVariables();
Index: code/branches/input/src/orxonox/objects/SpaceShip.cc
===================================================================
--- code/branches/input/src/orxonox/objects/SpaceShip.cc	(revision 1546)
+++ code/branches/input/src/orxonox/objects/SpaceShip.cc	(revision 1629)
@@ -35,19 +35,23 @@
 #include <OgreSceneNode.h>
 
-#include "CameraHandler.h"
 #include "util/Convert.h"
 #include "util/Math.h"
+
 #include "core/CoreIncludes.h"
 #include "core/ConfigValueIncludes.h"
 #include "core/Debug.h"
-#include "GraphicsEngine.h"
-#include "core/input/InputManager.h"
-#include "particle/ParticleInterface.h"
-#include "Projectile.h"
-#include "RotatingProjectile.h"
 #include "core/XMLPort.h"
 #include "core/ConsoleCommand.h"
+
 #include "network/Client.h"
-#include "hud/HUD.h"
+
+#include "tools/ParticleInterface.h"
+
+#include "GraphicsEngine.h"
+#include "RotatingProjectile.h"
+#include "ParticleProjectile.h"
+#include "ParticleSpawner.h"
+#include "Backlight.h"
+#include "CameraHandler.h"
 
 namespace orxonox
@@ -69,5 +73,5 @@
     SpaceShip* SpaceShip::instance_s;
 
-    
+
     SpaceShip *SpaceShip::getLocalShip(){
       Iterator<SpaceShip> it;
@@ -79,72 +83,82 @@
     }
 
-    SpaceShip::SpaceShip() :
-      //testvector_(0,0,0),
-      //bInvertYAxis_(false),
-      setMouseEventCallback_(false),
-      bLMousePressed_(false),
-      bRMousePressed_(false),
-      camNode_(0),
-      cam_(0),
-      camName_("CamNode"),
-      tt_(0),
-      redNode_(0),
-      greenNode_(0),
-      blinkTime_(0.0f),
-      chNearNode_(0),
-      chFarNode_(0),
-      timeToReload_(0.0f),
-      //reloadTime_(0.0f),
-      maxSideAndBackSpeed_(0.0f),
-      maxSpeed_(0.0f),
-      maxRotation_(0.0f),
-      translationAcceleration_(0.0f),
-      rotationAcceleration_(0.0f),
-      translationDamping_(0.0f),
-      rotationDamping_(0.0f),
-      maxRotationRadian_(0),
-      rotationAccelerationRadian_(0),
-      rotationDampingRadian_(0),
-      zeroRadian_(0),
-      mouseXRotation_(0),
-      mouseYRotation_(0),
-      mouseX_(0.0f),
-      mouseY_(0.0f),
-      emitterRate_(0.0f),
-      myShip_(false),
-      teamNr_(0),
-      health_(100)
+    SpaceShip::SpaceShip()
     {
         RegisterObject(SpaceShip);
-        this->registerAllVariables();
-
-        SpaceShip::instance_s = this;
-
-        this->setConfigValues();
-
-        initialDir_ = Vector3(1.0, 0.0, 0.0);
-        currentDir_ = initialDir_;
-        initialOrth_ = Vector3(0.0, 0.0, 1.0);
-        currentOrth_ = initialOrth_;
-
-        this->camName_ = this->getName() + "CamNode";
 
         this->setRotationAxis(1, 0, 0);
         this->setStatic(false);
 
-        COUT(3) << "Info: SpaceShip was loaded" << std::endl;
+        this->zeroRadian_ = 0;
+        this->maxSideAndBackSpeed_ = 0;
+        this->maxSpeed_ = 0;
+        this->maxRotation_ = 0;
+        this->translationAcceleration_ = 0;
+        this->rotationAcceleration_ = 0;
+        this->translationDamping_ = 0;
+        this->rotationDamping_ = 0;
+        this->maxRotationRadian_ = 0;
+        this->rotationAccelerationRadian_ = 0;
+        this->rotationDampingRadian_ = 0;
+
+        this->cam_ = 0;
+        this->tt1_ = 0;
+        this->tt2_ = 0;
+        this->smoke_ = 0;
+        this->fire_ = 0;
+
+        this->backlight_ = 0;
+
+        this->redNode_ = 0;
+        this->greenNode_ = 0;
+        this->blinkTime_ = 0;
+
+        this->timeToReload_ = 0;
+
+        this->bLMousePressed_ = false;
+        this->bRMousePressed_ = false;
+        this->mouseXRotation_ = 0;
+        this->mouseYRotation_ = 0;
+        this->myShip_ = false;
+
+        this->registerAllVariables();
+
+        SpaceShip::instance_s = this;
+
+        this->setConfigValues();
+
+        this->initialDir_ = Vector3(1.0, 0.0, 0.0);
+        this->currentDir_ = initialDir_;
+        this->initialOrth_ = Vector3(0.0, 0.0, 1.0);
+        this->currentOrth_ = initialOrth_;
+
+        this->camName_ = this->getName() + "CamNode";
+
+        this->teamNr_ = 0;
+        this->health_ = 100;
+
+        this->radarObject_ = static_cast<WorldEntity*>(this);
     }
 
     SpaceShip::~SpaceShip()
     {
-        if (this->tt_)
-            delete this->tt_;
-        if(setMouseEventCallback_)
-          InputManager::removeMouseHandler("SpaceShip");
-        if (this->cam_)
-          delete this->cam_;
-        if (!Identifier::isCreatingHierarchy() && !myShip_ && &HUD::getSingleton()!=NULL)
-          //remove the radar object
-          HUD::getSingleton().removeRadarObject(this->getNode());
+        if (this->isInitialized())
+        {
+            if (this->tt1_)
+                delete this->tt1_;
+            if (this->tt2_)
+                delete this->tt2_;
+
+            if (this->smoke_)
+                this->smoke_->destroy();
+            if (this->fire_)
+                this->fire_->destroy();
+
+            if (this->backlight_)
+                delete this->backlight_;
+
+            if (this->cam_)
+                delete this->cam_;
+        }
     }
 
@@ -154,5 +168,5 @@
           myShip_=true;
         else
-          HUD::getSingleton().addRadarObject(this->getNode(), 3);
+          this->setRadarObjectColour(this->getProjectileColour());
       }
       if(Model::create())
@@ -179,24 +193,37 @@
     void SpaceShip::init()
     {
-        // START CREATING THRUSTER
-        this->tt_ = new ParticleInterface(GraphicsEngine::getSingleton().getSceneManager(),"twinthruster" + this->getName(),"Orxonox/engineglow");
-        this->tt_->getParticleSystem()->setParameter("local_space","true");
-        this->tt_->newEmitter();
-/*
-        this->tt_->setDirection(Vector3(0,0,1));
-        this->tt_->setPositionOfEmitter(0, Vector3(20,-1,-15));
-        this->tt_->setPositionOfEmitter(1, Vector3(-20,-1,-15));
-*/
-        this->tt_->setDirection(Vector3(-1,0,0));
-        this->tt_->setPositionOfEmitter(0, Vector3(-15,20,-1));
-        this->tt_->setPositionOfEmitter(1, Vector3(-15,-20,-1));
-        this->tt_->setVelocity(50);
-
-        emitterRate_ = tt_->getRate();
-
-        Ogre::SceneNode* node2 = this->getNode()->createChildSceneNode(this->getName() + "particle2");
-        node2->setInheritScale(false);
-        tt_->addToSceneNode(node2);
-        // END CREATING THRUSTER
+        // START CREATING THRUSTERS
+        this->tt1_ = new ParticleInterface("Orxonox/thruster1", LODParticle::low);
+        this->tt1_->createNewEmitter();
+        this->tt1_->getAllEmitters()->setDirection(-this->getInitialDir());
+        this->tt1_->getEmitter(0)->setPosition(Vector3(-15, 20, -1));
+        this->tt1_->getEmitter(1)->setPosition(Vector3(-15, -20, -1));
+        this->tt1_->setSpeedFactor(3.0);
+
+        Ogre::SceneNode* node2a = this->getNode()->createChildSceneNode(this->getName() + "particle2a");
+        node2a->setInheritScale(false);
+        node2a->setScale(1, 1, 1);
+        tt1_->addToSceneNode(node2a);
+
+        this->tt2_ = new ParticleInterface("Orxonox/thruster2", LODParticle::normal);
+        this->tt2_->createNewEmitter();
+        this->tt2_->getAllEmitters()->setDirection(Vector3(-1, 0, 0));
+        this->tt2_->getEmitter(0)->setPosition(Vector3(-30, 40, -2));
+        this->tt2_->getEmitter(1)->setPosition(Vector3(-30, -40, -2));
+
+        Ogre::SceneNode* node2b = this->getNode()->createChildSceneNode(this->getName() + "particle2b");
+        node2b->setInheritScale(false);
+        node2b->setScale(0.5, 0.5, 0.5);
+        tt2_->addToSceneNode(node2b);
+
+        this->leftThrusterFlare_.setBillboardSet("Flares/ThrusterFlare1", Vector3(-7.5, -10, -0.5));
+        this->rightThrusterFlare_.setBillboardSet("Flares/ThrusterFlare1", Vector3(-7.5, 10, -0.5));
+
+        Ogre::SceneNode* node2c = this->getNode()->createChildSceneNode(this->getName() + "particle2c");
+        node2c->setInheritScale(false);
+        node2c->setScale(2, 2, 2);
+        node2c->attachObject(this->leftThrusterFlare_.getBillboardSet());
+        node2c->attachObject(this->rightThrusterFlare_.getBillboardSet());
+        // END CREATING THRUSTERS
 
         // START CREATING BLINKING LIGHTS
@@ -216,4 +243,19 @@
         // END CREATING BLINKING LIGHTS
 
+        // START CREATING ADDITIONAL EFFECTS
+        this->backlight_ = new Backlight(this->maxSpeed_, 0.8);
+        this->attachObject(this->backlight_);
+        this->backlight_->setPosition(-2.35, 0, 0.2);
+        this->backlight_->setColour(this->getProjectileColour());
+
+        this->smoke_ = new ParticleSpawner();
+        this->smoke_->setParticle("Orxonox/smoke5", LODParticle::normal, 0, 0, 3);
+        this->attachObject(this->smoke_);
+
+        this->fire_ = new ParticleSpawner();
+        this->fire_->setParticle("Orxonox/fire3", LODParticle::normal, 0, 0, 1);
+        this->attachObject(this->fire_);
+        // END CREATING ADDITIONAL EFFECTS
+
         if (this->isExactlyA(Class(SpaceShip)))
         {
@@ -232,8 +274,8 @@
             this->chFarNode_->attachObject(this->crosshairFar_.getBillboardSet());
             this->chFarNode_->setScale(0.4, 0.4, 0.4);
+            // END of testing crosshair
         }
 
         createCamera();
-        // END of testing crosshair
     }
 
@@ -245,6 +287,38 @@
     }
 
+    void SpaceShip::changedVisibility()
+    {
+        Model::changedVisibility();
+
+        this->tt1_->setEnabled(this->isVisible());
+        this->tt2_->setEnabled(this->isVisible());
+        this->redBillboard_.setVisible(this->isVisible());
+        this->greenBillboard_.setVisible(this->isVisible());
+        this->crosshairNear_.setVisible(this->isVisible());
+        this->crosshairFar_.setVisible(this->isVisible());
+        this->rightThrusterFlare_.setVisible(this->isVisible());
+        this->leftThrusterFlare_.setVisible(this->isVisible());
+        this->smoke_->setVisible(this->isVisible());
+        this->fire_->setVisible(this->isVisible());
+        this->backlight_->setVisible(this->isVisible());
+    }
+
+    void SpaceShip::changedActivity()
+    {
+        Model::changedActivity();
+
+        this->tt1_->setEnabled(this->isVisible());
+        this->tt2_->setEnabled(this->isVisible());
+        this->redBillboard_.setVisible(this->isVisible());
+        this->greenBillboard_.setVisible(this->isVisible());
+        this->crosshairNear_.setVisible(this->isVisible());
+        this->crosshairFar_.setVisible(this->isVisible());
+        this->rightThrusterFlare_.setVisible(this->isVisible());
+        this->leftThrusterFlare_.setVisible(this->isVisible());
+    }
+
     void SpaceShip::setCamera(const std::string& camera)
     {
+      myShip_=true; // TODO: this is only a hack
       camName_=camera;
       // change camera attributes here, if you want to ;)
@@ -266,5 +340,5 @@
       this->camNode_ = this->getNode()->createChildSceneNode(camName_);
       COUT(4) << "position: (this)" << this->getNode()->getPosition() << std::endl;
-      this->camNode_->setPosition(Vector3(-50,0,10));
+      this->camNode_->setPosition(Vector3(-25,0,5));
 //      Quaternion q1 = Quaternion(Radian(Degree(90)),Vector3(0,-1,0));
 //      Quaternion q2 = Quaternion(Radian(Degree(90)),Vector3(0,0,-1));
@@ -277,10 +351,9 @@
       Quaternion q1 = Quaternion(Radian(Degree(90)),Vector3(0,-1,0));
       Quaternion q2 = Quaternion(Radian(Degree(90)),Vector3(1,0,0));
-      camNode_->setOrientation(q2*q1);
+      this->camNode_->setOrientation(q2*q1);
       if(network::Client::getSingleton()!=0 && network::Client::getSingleton()->getShipID()==objectID){
         this->setBacksync(true);
         CameraHandler::getInstance()->requestFocus(cam_);
       }
-
     }
 
@@ -318,5 +391,4 @@
         XMLPortParamLoadOnly(SpaceShip, "transDamp", setTransDamp, xmlelement, mode);
         XMLPortParamLoadOnly(SpaceShip, "rotDamp", setRotDamp, xmlelement, mode);
-        myShip_=true; // TODO: this is only a hack
 
         SpaceShip::create();
@@ -325,35 +397,33 @@
     }
 
-    int sgn(float x)
-    {
-        if (x >= 0)
-            return 1;
-        else
-            return -1;
-    }
-
     std::string SpaceShip::whereAmI() {
-	return getConvertedValue<float, std::string>(SpaceShip::getLocalShip()->getPosition().x)
-	+ "  " + getConvertedValue<float, std::string>(SpaceShip::getLocalShip()->getPosition().y)
-	+ "  " + getConvertedValue<float, std::string>(SpaceShip::getLocalShip()->getPosition().z);
-    }
-
-    Vector3 SpaceShip::getDir() {
-        return currentDir_;
-    }
-
-    Vector3 SpaceShip::getOrth(){
-        return currentOrth_;
-    }
-
-    float SpaceShip::getMaxSpeed() { return maxSpeed_; }
+        return getConvertedValue<float, std::string>(SpaceShip::getLocalShip()->getPosition().x)
+        + "  " + getConvertedValue<float, std::string>(SpaceShip::getLocalShip()->getPosition().y)
+        + "  " + getConvertedValue<float, std::string>(SpaceShip::getLocalShip()->getPosition().z);
+    }
 
     void SpaceShip::tick(float dt)
     {
+        if (!this->isActive())
+            return;
+
         currentDir_ = getOrientation()*initialDir_;
-		currentOrth_ = getOrientation()*initialOrth_;
+        currentOrth_ = getOrientation()*initialOrth_;
 
         if (this->cam_)
             this->cam_->tick(dt);
+
+        if (this->smoke_)
+            this->smoke_->setVisible(this->isVisible() && this->health_ < 40);
+        if (this->fire_)
+            this->fire_->setVisible(this->isVisible() && this->health_ < 20);
+
+        if (this->backlight_)
+        {   // (there's already fire ||                 we're to slow                 ||                  we're moving backwards                  )
+            if (this->health_ < 20   || this->getVelocity().squaredLength() < 150*150 || this->getVelocity().dotProduct(this->getInitialDir()) < 0)
+                this->backlight_->setActive(false);
+            else
+                this->backlight_->setActive(true);
+        }
 
         if (this->redNode_ && this->greenNode_)
@@ -374,15 +444,13 @@
         {
 
-            Projectile *p;
-            if (this->isExactlyA(Class(SpaceShip)))
-                p = new RotatingProjectile(this);
-            else
-                p = new Projectile(this);
-            p->setColour(this->getProjectileColour());
-            p->create();
-            if(p->classID==0)
+            BillboardProjectile* projectile = new ParticleProjectile(this);
+            projectile->setColour(this->getProjectileColour());
+            projectile->create();
+            if (projectile->classID == 0)
+            {
               COUT(3) << "generated projectile with classid 0" <<  std::endl; // TODO: remove this output
-
-            p->setBacksync(true);
+            }
+
+            projectile->setBacksync(true);
             this->timeToReload_ = this->reloadTime_;
         }
@@ -464,19 +532,21 @@
 
         if (this->acceleration_.x > 0)
-            this->tt_->setRate(emitterRate_);
+        {
+            this->tt1_->setEnabled(true);
+            this->tt2_->setEnabled(true);
+        }
         else
-            this->tt_->setRate(0);
-
-        if( myShip_ )
-        {
-          COUT(5) << "steering our ship: " << objectID << std::endl;
-          this->acceleration_.x = 0;
-          this->acceleration_.y = 0;
-          this->momentum_ = 0;
-          this->mouseXRotation_ = Radian(0);
-          this->mouseYRotation_ = Radian(0);
-          this->bLMousePressed_ = false;
-        }/*else
-          COUT(4) << "not steering ship: " << objectID << " our ship: " << network::Client::getSingleton()->getShipID() << std::endl;*/
+        {
+            this->tt1_->setEnabled(false);
+            this->tt2_->setEnabled(false);
+        }
+
+        COUT(5) << "steering our ship: " << objectID << std::endl;
+        this->acceleration_.x = 0;
+        this->acceleration_.y = 0;
+        this->momentum_ = 0;
+        this->mouseXRotation_ = Radian(0);
+        this->mouseYRotation_ = Radian(0);
+        this->bLMousePressed_ = false;
     }
 
Index: code/branches/input/src/orxonox/objects/SpaceShip.h
===================================================================
--- code/branches/input/src/orxonox/objects/SpaceShip.h	(revision 1546)
+++ code/branches/input/src/orxonox/objects/SpaceShip.h	(revision 1629)
@@ -36,13 +36,12 @@
 #include "Camera.h"
 #include "Model.h"
+#include "RadarViewable.h"
 #include "tools/BillboardSet.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport SpaceShip : public Model
+    class _OrxonoxExport SpaceShip : public Model, public RadarViewable
     {
         public:
-          
-
             static SpaceShip *getLocalShip();
 
@@ -55,4 +54,6 @@
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
             virtual void tick(float dt);
+            virtual void changedVisibility();
+            virtual void changedActivity();
 
             void setCamera(const std::string& camera = "");
@@ -65,4 +66,19 @@
             void setRotDamp(float value);
             void getFocus();
+
+            inline float getMaxSpeed() const
+                { return this->maxSpeed_; }
+            inline float getMaxSideAndBackSpeed() const
+                { return this->maxSideAndBackSpeed_; }
+            inline float getMaxRotation() const
+                { return this->maxRotation_; }
+            inline float getTransAcc() const
+                { return this->translationAcceleration_; }
+            inline float getRotAcc() const
+                { return this->rotationAcceleration_; }
+            inline float getTransDamp() const
+                { return this->translationDamping_; }
+            inline float getRotDamp() const
+                { return this->rotationDamping_; }
 
             static std::string whereAmI();
@@ -83,12 +99,18 @@
             void doFire();
 
-            float getMaxSpeed();
-            Vector3 getDir();
-            Vector3 getOrth();
+            inline const Vector3& getDir() const
+                { return this->currentDir_; }
+            inline const Vector3& getInitialDir() const
+                { return this->initialDir_; }
+            inline const Vector3& getOrth() const
+                { return this->currentOrth_; }
+            inline const Vector3& getInitialOrth() const
+                { return this->initialOrth_; }
+
             Camera* getCamera();
 
             int getTeamNr() const
                 { return this->teamNr_; }
-            int getHealth() const
+            float getHealth() const
                 { return this->health_; }
 
@@ -110,5 +132,4 @@
             Vector3 currentOrth_;
             bool bInvertYAxis_;
-            bool setMouseEventCallback_;
             bool bLMousePressed_;
             bool bRMousePressed_;
@@ -118,6 +139,10 @@
             std::string camName_;
 
+            ParticleInterface* tt1_;
+            ParticleInterface* tt2_;
+            BillboardSet leftThrusterFlare_;
+            BillboardSet rightThrusterFlare_;
 
-            ParticleInterface* tt_;
+            Backlight* backlight_;
 
             BillboardSet redBillboard_;
@@ -126,4 +151,7 @@
             Ogre::SceneNode* greenNode_;
             float blinkTime_;
+
+            ParticleSpawner* smoke_;
+            ParticleSpawner* fire_;
 
             BillboardSet crosshairNear_;
@@ -153,11 +181,9 @@
             float mouseY_;
 
-            float emitterRate_;
-
         protected:
             bool myShip_;
 
             int teamNr_;
-            int health_;
+            float health_;
 
             static SpaceShip* instance_s;
Index: code/branches/input/src/orxonox/objects/SpaceShipAI.cc
===================================================================
--- code/branches/input/src/orxonox/objects/SpaceShipAI.cc	(revision 1546)
+++ code/branches/input/src/orxonox/objects/SpaceShipAI.cc	(revision 1629)
@@ -32,4 +32,5 @@
 #include <OgreMath.h>
 #include "Projectile.h"
+#include "ParticleSpawner.h"
 #include "core/CoreIncludes.h"
 #include "core/Iterator.h"
@@ -37,4 +38,5 @@
 #include "core/ConsoleCommand.h"
 #include "core/XMLPort.h"
+#include "tools/ParticleInterface.h"
 
 #define ACTION_INTERVAL 1.0f
@@ -51,6 +53,4 @@
         RegisterObject(SpaceShipAI);
 
-        this->alive_ = true;
-        this->setPosition(Vector3(rnd(-1000, 1000), rnd(-1000, 1000), rnd(-1000, 0000)));
         this->target_ = 0;
         this->bShooting_ = 0;
@@ -70,8 +70,13 @@
     }
 
+    SpaceShipAI::~SpaceShipAI()
+    {
+        for (Iterator<SpaceShipAI> it = ObjectList<SpaceShipAI>::begin(); it; ++it)
+            it->shipDied(this);
+    }
+
     void SpaceShipAI::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     {
         SpaceShip::XMLPort(xmlelement, mode);
-        myShip_=true;
 
         this->actionTimer_.setTimer(ACTION_INTERVAL, true, this, createExecutor(createFunctor(&SpaceShipAI::action)));
@@ -85,4 +90,5 @@
             newenemy->setMesh("assff.mesh");
 //            newenemy->setPosition(0, 0, 0);
+            newenemy->setPosition(Vector3(rnd(-3000, 3000), rnd(-3000, 3000), rnd(-3000, 3000)));
             newenemy->setScale(10);
             newenemy->setMaxSpeed(500);
@@ -95,4 +101,8 @@
             Element xmlelement;
             newenemy->XMLPort(xmlelement, XMLPort::LoadObject);
+
+            ParticleSpawner* spawneffect = new ParticleSpawner("Orxonox/fairytwirl", LODParticle::normal, 2.0, 0, 0, newenemy->getOrth());
+            spawneffect->setPosition(newenemy->getPosition() - newenemy->getOrth() * 50);
+            spawneffect->create();
         }
     }
@@ -103,6 +113,5 @@
         for (Iterator<SpaceShipAI> it = ObjectList<SpaceShipAI>::begin(); it; )
         {
-            delete *(it++);
-            ++i;
+            (it++)->kill();
             if (num && i >= num)
                 break;
@@ -122,69 +131,93 @@
         // search enemy
         random = rnd(maxrand);
-//std::cout << "search enemy: " << random << std::endl;
-        if (random < 20 && (!this->target_))
-        {
+        if (random < 15 && (!this->target_))
             this->searchNewTarget();
-        }
 
         // forget enemy
         random = rnd(maxrand);
-//std::cout << "forget enemy: " << random << std::endl;
         if (random < 5 && (this->target_))
-        {
             this->forgetTarget();
-        }
 
         // next enemy
         random = rnd(maxrand);
-//std::cout << "next enemy: " << random << std::endl;
         if (random < 10 && (this->target_))
-        {
             this->searchNewTarget();
-        }
 
         // fly somewhere
         random = rnd(maxrand);
-//std::cout << "fly somewhere: " << random << std::endl;
-        if (random < 40 && (!this->bHasTargetPosition_ && !this->target_))
-        {
+        if (random < 50 && (!this->bHasTargetPosition_ && !this->target_))
             this->searchNewTargetPosition();
-        }
 
         // stop flying
         random = rnd(maxrand);
-//std::cout << "stop flying: " << random << std::endl;
         if (random < 10 && (this->bHasTargetPosition_ && !this->target_))
-        {
             this->bHasTargetPosition_ = false;
-        }
 
         // fly somewhere else
         random = rnd(maxrand);
-//std::cout << "fly somewhere else: " << random << std::endl;
         if (random < 30 && (this->bHasTargetPosition_ && !this->target_))
-        {
             this->searchNewTargetPosition();
-        }
 
         // shoot
         random = rnd(maxrand);
-//std::cout << "shoot: " << random << std::endl;
         if (random < 75 && (this->target_ && !this->bShooting_))
-        {
             this->bShooting_ = true;
-        }
 
         // stop shooting
         random = rnd(maxrand);
-//std::cout << "stop shooting: " << random << std::endl;
         if (random < 25 && (this->bShooting_))
-        {
             this->bShooting_ = false;
-        }
+    }
+
+    void SpaceShipAI::damage(float damage)
+    {
+        this->health_ -= damage;
+        if (this->health_ <= 0)
+        {
+            this->kill();
+            SpaceShipAI::createEnemy(1);
+        }
+    }
+
+    void SpaceShipAI::kill()
+    {
+        ParticleSpawner* explosion = new ParticleSpawner("Orxonox/BigExplosion1part1", LODParticle::low, 3.0);
+        explosion->setPosition(this->getPosition());
+        explosion->getParticleInterface()->setKeepParticlesInLocalSpace(true);
+        explosion->setScale(4);
+        explosion->create();
+
+        explosion = new ParticleSpawner("Orxonox/BigExplosion1part2", LODParticle::normal, 3.0);
+        explosion->setPosition(this->getPosition());
+        explosion->getParticleInterface()->setKeepParticlesInLocalSpace(true);
+        explosion->setScale(4);
+        explosion->create();
+        explosion = new ParticleSpawner("Orxonox/BigExplosion1part2", LODParticle::high, 3.0);
+        explosion->setPosition(this->getPosition());
+        explosion->getParticleInterface()->setKeepParticlesInLocalSpace(true);
+        explosion->setScale(4);
+        explosion->create();
+
+        Vector3 ringdirection = Vector3(rnd(), rnd(), rnd());
+        ringdirection.normalise();
+        explosion = new ParticleSpawner("Orxonox/BigExplosion1part3", LODParticle::normal, 3.0, 0.5, 0, ringdirection);
+        explosion->setPosition(this->getPosition());
+        explosion->getParticleInterface()->setKeepParticlesInLocalSpace(true);
+        explosion->setScale(4);
+        explosion->create();
+        explosion = new ParticleSpawner("Orxonox/BigExplosion1part3", LODParticle::high, 3.0, 0.5, 0, ringdirection);
+        explosion->setPosition(this->getPosition());
+        explosion->getParticleInterface()->setKeepParticlesInLocalSpace(true);
+        explosion->setScale(4);
+        explosion->create();
+
+        delete this;
     }
 
     void SpaceShipAI::tick(float dt)
     {
+        if (!this->isActive())
+            return;
+
         if (this->target_)
             this->aimAtTarget();
@@ -193,5 +226,5 @@
             this->moveToTargetPosition(dt);
 
-        if (this->bShooting_ && this->isCloseAtTarget(2000) && this->isLookingAtTarget(Ogre::Math::PI / 10.0f))
+        if (this->bShooting_ && this->isCloseAtTarget(2500) && this->isLookingAtTarget(Ogre::Math::PI / 20.0))
             this->doFire();
 
@@ -201,23 +234,20 @@
     void SpaceShipAI::moveToTargetPosition(float dt)
     {
-        static Radian RadianZERO(0);
-
-//        float dotprod = (this->getOrientation() * Ogre::Vector3::UNIT_X).dotProduct(this->targetPosition_ - this->getPosition());
-        Quaternion rotation = (this->getOrientation() * Ogre::Vector3::UNIT_X).getRotationTo(this->targetPosition_ - this->getPosition());
-/*
-std::cout << "scalprod: " << dotprod << std::endl;
-std::cout << "dist: " << this->targetPosition_ - this->getPosition() << std::endl;
-std::cout << "yaw: " << rotation.getYaw().valueRadians() << std::endl;
-std::cout << "pitch: " << rotation.getPitch().valueRadians() << std::endl;
-std::cout << "roll: " << rotation.getRoll().valueRadians() << std::endl;
-*/
-        this->setMoveYaw(-rotation.getRoll().valueRadians());
-        this->setMovePitch(rotation.getYaw().valueRadians());
-
-        if ((this->targetPosition_ - this->getPosition()).length() > 100)
-        {
-            this->setMoveLongitudinal(1);
-        }
-
+        Vector2 coord = get2DViewdirection(this->getPosition(), this->getDir(), this->getOrth(), this->targetPosition_);
+
+        float distance = (this->targetPosition_ - this->getPosition()).length();
+        if (this->target_ || distance > 50)
+        {
+            // Multiply with 0.8 to make them a bit slower
+            this->setMoveYaw(0.8 * sgn(coord.x) * coord.x*coord.x);
+            this->setMovePitch(0.8 * sgn(coord.y) * coord.y*coord.y);
+        }
+
+        if (this->target_ && distance < 1000 && this->getVelocity().squaredLength() > this->target_->getVelocity().squaredLength())
+            this->setMoveLongitudinal(-0.5); // They don't brake with full power to give the player a chance
+        else if (!this->target_ && distance <= this->getVelocity().length() / (2 * this->getTransAcc()))
+            this->setMoveLongitudinal(-1.0);
+        else
+            this->setMoveLongitudinal(0.8);
     }
 
@@ -241,5 +271,5 @@
                 Vector3 distanceNew = it->getPosition() - this->getPosition();
                 if (!this->target_ || it->getPosition().squaredDistance(this->getPosition()) * (1.5f + acos((this->getOrientation() * Ogre::Vector3::UNIT_X).dotProduct(distanceNew) / speed / distanceNew.length()) / (2 * Ogre::Math::PI))
-                        < this->targetPosition_.squaredDistance(this->getPosition()) * (1.5f + acos((this->getOrientation() * Ogre::Vector3::UNIT_X).dotProduct(distanceCurrent) / speed / distanceCurrent.length()) / (2 * Ogre::Math::PI)))
+                        < this->targetPosition_.squaredDistance(this->getPosition()) * (1.5f + acos((this->getOrientation() * Ogre::Vector3::UNIT_X).dotProduct(distanceCurrent) / speed / distanceCurrent.length()) / (2 * Ogre::Math::PI)) + rnd(-250, 250))
                 {
                     this->target_ = (*it);
@@ -248,5 +278,5 @@
             }
         }
-   }
+    }
 
     void SpaceShipAI::forgetTarget()
@@ -260,34 +290,29 @@
         if (!this->target_)
             return;
-/*
-        Vector3 enemymovement = this->target_->getVelocity();
-        Vector3 distance_normalised = this->target_->getPosition() - this->getPosition();
-        distance_normalised.normalise();
-
-        float scalarprod = enemymovement.dotProduct(distance_normalised);
-        float aimoffset = scalarprod*scalarprod + Projectile::getSpeed() * Projectile::getSpeed() - this->target_->getVelocity().squaredLength();
-        if (aimoffset < 0)
-        {
-            this->bHasTargetPosition_ = false;
-            return;
-        }
-        aimoffset = -scalarprod + sqrt(aimoffset);
-        this->targetPosition_ = enemymovement + distance_normalised * aimoffset;
-        this->bHasTargetPosition_ = true;
-
-        std::cout << "targetpos: " << this->targetPosition_ << std::endl;
-*/
-        this->targetPosition_ = this->target_->getPosition();
-        this->bHasTargetPosition_ = true;
+
+        this->targetPosition_ = getPredictedPosition(this->getPosition(), Projectile::getSpeed(), this->target_->getPosition(), this->target_->getOrientation() * this->target_->getVelocity());
+        this->bHasTargetPosition_ = (this->targetPosition_ != Vector3::ZERO);
     }
 
     bool SpaceShipAI::isCloseAtTarget(float distance)
     {
-        return (this->getPosition().squaredDistance(this->targetPosition_) < distance*distance);
+        if (!this->target_)
+            return (this->getPosition().squaredDistance(this->targetPosition_) < distance*distance);
+        else
+            return (this->getPosition().squaredDistance(this->target_->getPosition()) < distance*distance);
     }
 
     bool SpaceShipAI::isLookingAtTarget(float angle)
     {
-        return (this->getOrientation() * Ogre::Vector3::UNIT_X).directionEquals(this->targetPosition_ - this->getPosition(), Radian(angle));
+        return (getAngle(this->getPosition(), this->getDir(), this->targetPosition_) < angle);
+    }
+
+    void SpaceShipAI::shipDied(SpaceShipAI* ship)
+    {
+        if (ship == this->target_)
+        {
+            this->forgetTarget();
+            this->searchNewTargetPosition();
+        }
     }
 }
Index: code/branches/input/src/orxonox/objects/SpaceShipAI.h
===================================================================
--- code/branches/input/src/orxonox/objects/SpaceShipAI.h	(revision 1546)
+++ code/branches/input/src/orxonox/objects/SpaceShipAI.h	(revision 1629)
@@ -44,7 +44,12 @@
         public:
             SpaceShipAI();
+            virtual ~SpaceShipAI();
+
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
             static void createEnemy(int num);
             static void killEnemies(int num);
+            void shipDied(SpaceShipAI* ship);
+            void damage(float damage);
+            void kill();
 
         private:
@@ -64,5 +69,4 @@
             Timer<SpaceShipAI> actionTimer_;
 
-            bool alive_;
             bool bHasTargetPosition_;
             Vector3 targetPosition_;
Index: code/branches/input/src/orxonox/objects/WorldEntity.cc
===================================================================
--- code/branches/input/src/orxonox/objects/WorldEntity.cc	(revision 1546)
+++ code/branches/input/src/orxonox/objects/WorldEntity.cc	(revision 1629)
@@ -45,12 +45,5 @@
     unsigned int WorldEntity::worldEntityCounter_s = 0;
 
-    WorldEntity::WorldEntity() :
-      velocity_    (0, 0, 0),
-      acceleration_(0, 0, 0),
-      rotationAxis_(0, 1, 0),
-      rotationRate_(0),
-      momentum_    (0),
-      node_        (0),
-      bStatic_     (true)
+    WorldEntity::WorldEntity()
     {
         RegisterObject(WorldEntity);
@@ -58,24 +51,37 @@
         if (GraphicsEngine::getSingleton().getSceneManager())
         {
-          std::ostringstream name;
-          name << (WorldEntity::worldEntityCounter_s++);
-          this->setName("WorldEntity" + name.str());
-          this->node_ = GraphicsEngine::getSingleton().getSceneManager()->getRootSceneNode()->createChildSceneNode(this->getName());
+            std::ostringstream name;
+            name << (WorldEntity::worldEntityCounter_s++);
+            this->setName("WorldEntity" + name.str());
+            this->node_ = GraphicsEngine::getSingleton().getSceneManager()->getRootSceneNode()->createChildSceneNode(this->getName());
 
-          registerAllVariables();
+            registerAllVariables();
         }
+        else
+        {
+            this->node_ = 0;
+        }
+
+        this->bStatic_ = true;
+        this->velocity_ = Vector3(0, 0, 0);
+        this->acceleration_ = Vector3(0, 0, 0);
+        this->rotationAxis_ = Vector3(0, 1, 0);
+        this->rotationRate_ = 0;
+        this->momentum_ = 0;
     }
-    
+
 
     WorldEntity::~WorldEntity()
     {
-      // just to make sure we clean out all scene nodes
-      if(this->getNode())
-        this->getNode()->removeAndDestroyAllChildren();
+        if (this->isInitialized())
+        {
+            this->getNode()->removeAndDestroyAllChildren();
+            GraphicsEngine::getSingleton().getSceneManager()->destroySceneNode(this->getName());
+        }
     }
 
     void WorldEntity::tick(float dt)
     {
-        if (!this->bStatic_)
+        if (!this->bStatic_ && this->isActive())
         {
 //             COUT(4) << "acceleration: " << this->acceleration_ << " velocity: " << this->velocity_ << std::endl;
@@ -89,11 +95,4 @@
     }
 
-    void WorldEntity::loadParams(TiXmlElement* xmlElem)
-    {
-
-        BaseObject::loadParams(xmlElem);
-        create();
-    }
-    
 
     void WorldEntity::setYawPitchRoll(const Degree& yaw, const Degree& pitch, const Degree& roll)
@@ -122,5 +121,5 @@
 
         XMLPortObject(WorldEntity, WorldEntity, "attached", attachWorldEntity, getAttachedWorldEntity, xmlelement, mode, false, true);
-        
+
         WorldEntity::create();
     }
@@ -129,4 +128,7 @@
     void WorldEntity::registerAllVariables()
     {
+      // register inheritec variables from BaseObject
+      registerVar( (void*) &(this->bActive_), sizeof(this->bActive_), network::DATA, 0x3);
+      registerVar( (void*) &(this->bVisible_), sizeof(this->bVisible_), network::DATA, 0x3);
       // register coordinates
       registerVar( (void*) &(this->getPosition().x), sizeof(this->getPosition().x), network::DATA, 0x3);
@@ -163,4 +165,5 @@
     {
         this->attachedWorldEntities_.push_back(entity);
+        this->attachObject(entity);
     }
 
@@ -172,3 +175,15 @@
             return 0;
     }
+
+    void WorldEntity::attachObject(const WorldEntity& obj) const
+    {
+        GraphicsEngine::getSingleton().getSceneManager()->getRootSceneNode()->removeChild(obj.getNode());
+        this->getNode()->addChild(obj.getNode());
+    }
+
+    void WorldEntity::attachObject(WorldEntity* obj) const
+    {
+        GraphicsEngine::getSingleton().getSceneManager()->getRootSceneNode()->removeChild(obj->getNode());
+        this->getNode()->addChild(obj->getNode());
+    }
 }
Index: code/branches/input/src/orxonox/objects/WorldEntity.h
===================================================================
--- code/branches/input/src/orxonox/objects/WorldEntity.h	(revision 1546)
+++ code/branches/input/src/orxonox/objects/WorldEntity.h	(revision 1629)
@@ -51,5 +51,4 @@
 
             virtual void tick(float dt);
-            virtual void loadParams(TiXmlElement* xmlElem);
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
             virtual inline bool create(){ return Synchronisable::create(); }
@@ -58,5 +57,5 @@
             const WorldEntity* getAttachedWorldEntity(unsigned int index) const;
 
-            inline Ogre::SceneNode* getNode()
+            inline Ogre::SceneNode* getNode() const
                 { return this->node_; }
 
@@ -74,45 +73,49 @@
             inline const Vector3& getPosition() const
                 { return this->node_->getPosition(); }
-
-            inline void translate(const Vector3 &d, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
+            inline const Vector3& getWorldPosition() const
+                { return this->node_->getWorldPosition(); }
+
+            inline void translate(const Vector3& d, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
                 { this->node_->translate(d, relativeTo); }
             inline void translate(Real x, Real y, Real z, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
                 { this->node_->translate(x, y, z, relativeTo); }
-            inline void translate(const Matrix3 &axes, const Vector3 &move, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
+            inline void translate(const Matrix3& axes, const Vector3& move, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
                 { this->node_->translate(axes, move, relativeTo); }
-            inline void translate(const Matrix3 &axes, Real x, Real y, Real z, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
+            inline void translate(const Matrix3& axes, Real x, Real y, Real z, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
                 { this->node_->translate(axes, x, y, z, relativeTo); }
 
-            inline void yaw(const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
+            inline void yaw(const Radian& angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
                 { this->node_->yaw(angle, relativeTo); }
-            inline void pitch(const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
+            inline void pitch(const Radian& angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
                 { this->node_->pitch(angle, relativeTo); }
-            inline void roll(const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
+            inline void roll(const Radian& angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
                 { this->node_->roll(angle, relativeTo); }
             void setYawPitchRoll(const Degree& yaw, const Degree& pitch, const Degree& roll);
 
-            inline void setYaw(const Degree &angle)
+            inline void setYaw(const Degree& angle)
                 { this->node_->yaw(angle, Ogre::Node::TS_LOCAL); }
-            inline void setPitch(const Degree &angle)
+            inline void setPitch(const Degree& angle)
                 { this->node_->pitch(angle, Ogre::Node::TS_LOCAL); }
-            inline void setRoll(const Degree &angle)
+            inline void setRoll(const Degree& angle)
                 { this->node_->roll(angle, Ogre::Node::TS_LOCAL); }
 
             inline const Ogre::Quaternion& getOrientation()
               { return this->node_->getOrientation(); }
+            inline const Ogre::Quaternion& getWorldOrientation()
+              { return this->node_->getWorldOrientation(); }
             inline void setOrientation(const Ogre::Quaternion& quat)
               { this->node_->setOrientation(quat); }
-            inline void rotate(const Vector3 &axis, const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
+            inline void rotate(const Vector3& axis, const Radian& angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
               { this->node_->rotate(axis, angle, relativeTo); }
             inline void setDirectionLoader(Real x, Real y, Real z)
               { this->setDirection(x, y, z); }
-            inline void setDirection(Real x, Real y, Real z, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
+            inline void setDirection(Real x, Real y, Real z, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL, const Vector3& localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
               { this->node_->setDirection(x, y, z, relativeTo, localDirectionVector); }
-            inline void setDirection(const Vector3 &vec, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
+            inline void setDirection(const Vector3& vec, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL, const Vector3& localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
               { this->node_->setDirection(vec, relativeTo, localDirectionVector); }
-            inline void lookAt(const Vector3 &targetPoint, Ogre::Node::TransformSpace relativeTo, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
+            inline void lookAt(const Vector3& targetPoint, Ogre::Node::TransformSpace relativeTo, const Vector3& localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
               { this->node_->lookAt(targetPoint, relativeTo, localDirectionVector); }
 
-            inline void setScale(const Vector3 &scale)
+            inline void setScale(const Vector3& scale)
               { this->node_->setScale(scale); }
             inline void setScale(Real x, Real y, Real z)
@@ -124,5 +127,5 @@
             inline const Vector3& getScale(void) const
               { return this->node_->getScale(); }
-            inline void scale(const Vector3 &scale)
+            inline void scale(const Vector3& scale)
               { this->node_->scale(scale); }
             inline void scale(Real x, Real y, Real z)
@@ -131,11 +134,13 @@
               { this->node_->scale(scale, scale, scale); }
 
-            inline void attachObject(Ogre::MovableObject *obj)
+            void attachObject(const WorldEntity& obj) const;
+            void attachObject(WorldEntity* obj) const;
+            inline void attachObject(Ogre::MovableObject* obj) const
               { this->node_->attachObject(obj); }
-            inline void attachObject(Mesh &mesh)
+            inline void attachObject(Mesh& mesh) const
               { this->node_->attachObject(mesh.getEntity()); }
-            inline void detachObject(Ogre::MovableObject *obj)
+            inline void detachObject(Ogre::MovableObject* obj) const
               { this->node_->detachObject(obj); }
-            inline void detachAllObjects()
+            inline void detachAllObjects() const
               { this->node_->detachAllObjects(); }
 
@@ -179,5 +184,5 @@
             inline void setStatic(bool bStatic)
                 { this->bStatic_ = bStatic; }
-            inline bool isStatic()
+            inline bool isStatic() const
                 { return this->bStatic_; }
 
