Index: code/branches/particleEffectsHS15/src/modules/weapons/projectiles/MineProjectile.cc
===================================================================
--- code/branches/particleEffectsHS15/src/modules/weapons/projectiles/MineProjectile.cc	(revision 10836)
+++ code/branches/particleEffectsHS15/src/modules/weapons/projectiles/MineProjectile.cc	(revision 10889)
@@ -35,14 +35,6 @@
 
 #include "core/CoreIncludes.h"
+#include "graphics/Model.h"
 #include "core/command/Executor.h"
-#include "util/Convert.h"
-#include "util/Math.h"
-
-#include "core/CoreIncludes.h"
-#include "graphics/Model.h"
-#include "graphics/ParticleSpawner.h"
-#include "Scene.h"
-#include "core/command/Executor.h"
-#include "tools/ParticleInterface.h"
 
 namespace orxonox
@@ -50,51 +42,113 @@
     RegisterClass(MineProjectile);
 
-    MineProjectile::MineProjectile(Context* context) : Projectile(context)
+    MineProjectile::MineProjectile(Context* context) : MovableEntity(context), BasicProjectile()
     {
         RegisterObject(MineProjectile);
 
-        this->lifeTime_ = 1.0f;
+        this->bActive_ = false;
+        this->maxTimeUntilExplosion_ = 10.0f;
+        this->timeUntilActivation_ = 1.0f;
 
-        Model* model = new Model(this->getContext());
-        model->setMeshSource("sphere.mesh");
-        model->setScale(15.0);
-        this->attach(model);
-        model->setPosition(Vector3(0,0,0));
+        rings_ = new MovableEntity(this->getContext());
+        this->attach(rings_);
+        rings_->setPosition(Vector3(0.0,0.0,0.0));
+        rings_->setAngularVelocity(Vector3(0.0,5.0,0.0));
+
+        modelCore_ = new Model(this->getContext());
+        modelCore_->setMeshSource("Mine_Core.mesh");
+        modelCore_->setScale(15.0);
+        this->attach(modelCore_);
+        modelCore_->setPosition(Vector3(0,0,0));
+
+        modelRing1_ = new Model(this->getContext());
+        modelRing1_->setMeshSource("Mine_Ring.mesh");
+        modelRing1_->setScale(15.0);
+        rings_->attach(modelRing1_);
+        modelRing1_->setPosition(Vector3(0,0,0));
+        modelRing1_->yaw(Degree(0));
+
+        modelRing2_ = new Model(this->getContext());
+        modelRing2_->setMeshSource("Mine_Ring.mesh");
+        modelRing2_->setScale(15.0);
+        rings_->attach(modelRing2_);
+        modelRing2_->setPosition(Vector3(0,0,0));
+        modelRing2_->yaw(Degree(180));
+
+        if (GameMode::isMaster())
+        {
+            this->setMass(10.0f);
+            this->setFriction(100.0f);
+            this->enableCollisionCallback();
+            this->setCollisionResponse(false);
+            this->setCollisionType(Dynamic);
+
+            // Create a sphere collision shape and attach it to the projectile.
+            collisionShape_ = new SphereCollisionShape(this->getContext());
+            collisionShape_->setRadius(10.0f);
+            this->attachCollisionShape(collisionShape_);
+
+            // Create a distance trigger and attach it to the projectile.
+            distanceTrigger_ = new DistanceTrigger(this->getContext());
+            this->attach(distanceTrigger_);
+            distanceTrigger_->setPosition(Vector3(0,0,0));
+            distanceTrigger_->setDistance(40.0f);
+            distanceTrigger_->addTarget("Pawn");
+            distanceTrigger_->setStayActive(true);
+        }
     }
 
-    
+    MineProjectile::~MineProjectile()
+    {
+        /*if (modelCore_ != NULL)
+        {
+            modelCore_->destroy();
+        }*/
+        /*if (distanceTrigger_ != NULL)
+        {
+            distanceTrigger_->destroy();
+        }*/
+    }
+
     /**
     @brief
-        This function starts a timer that will cause the projectile to Mine after a time defined by the argument @param LifeTime.        
+        TODO
     */
-    void MineProjectile::setLifeTime(float lifeTime)
+    void MineProjectile::setMaxTimeUntilExplosion(float maxTimeUntilExplosion)
     {
-        orxout() << lifeTime << endl;
-
-        if (lifeTime >= 0)
+        if (maxTimeUntilExplosion >= 0)
         {
-            this->lifeTime_ = lifeTime;
-            this->explodeTimer.setTimer(this->lifeTime_, false, createExecutor(createFunctor(&MineProjectile::Explode, this)));
+            this->maxTimeUntilExplosion_ = maxTimeUntilExplosion;
+            if (GameMode::isMaster())
+            {
+                this->explodeTimer_.setTimer(this->maxTimeUntilExplosion_, false, createExecutor(createFunctor(&MineProjectile::Explode, this)));
+            }
         }
         else
         {
-            this->lifeTime_ = 0;
+            this->maxTimeUntilExplosion_ = 0;
         }
     }
 
+    /**
+    @brief
+        TODO
+    */
+    void MineProjectile::setTimeUntilActivation(float timeUntilActivation)
+    {
+        timeUntilActivation_ = timeUntilActivation;
+
+        if (GameMode::isMaster())
+        {
+            this->activationTimer_.setTimer(this->timeUntilActivation_, false, createExecutor(createFunctor(&MineProjectile::Activate, this)));
+        }
+    }
 
     /**
     @brief
-        This is the setter function for the damageReduction_ variable. The value of the variable is bounded between 0 and 1.
-    */
-
-
-    /**
-    @brief
-        If this function is called the projectile Mines up into many child projectiles. The original projectiles does not get destroyed but it will never Mine up again.
+        TODO
     */
     void MineProjectile::Explode()
     {
-        orxout() << "Explode" << endl;
+        orxout() << "MineProjectile::Explode" << endl;
 
         this->destroyLater();
@@ -102,3 +156,14 @@
 
     }
+
+    /**
+    @brief
+        TODO
+    */
+    void MineProjectile::Activate()
+    {
+        orxout() << "MineProjectile::Activate" << endl;
+
+        bActive_ = true;
+    }
 }
