Index: code/branches/weaponFS15/src/modules/weapons/projectiles/GravityBomb.cc
===================================================================
--- code/branches/weaponFS15/src/modules/weapons/projectiles/GravityBomb.cc	(revision 10436)
+++ code/branches/weaponFS15/src/modules/weapons/projectiles/GravityBomb.cc	(revision 10455)
@@ -3,5 +3,5 @@
  *
  *  Created on: Mar 26, 2015
- *      Author: meggiman
+ *      Author: Manuel Eggimann
  */
 #include "GravityBomb.h"
@@ -12,5 +12,5 @@
 	RegisterClass(GravityBomb);
 
-	const float GravityBomb::LIFETIME = 5;
+	const float GravityBomb::LIFETIME = 5;  ///< The gravity bomb lifetime in seconds.
 
 	GravityBomb::GravityBomb(Context* context):
@@ -41,5 +41,5 @@
 	            rocketModel->scale(3.0f);
 	            this->attach(rocketModel);
-
+				//Add second model because the bomb consists of the bomb and attached rockets (2 separate models)
 	            Model* bombModel =  new Model(this->getContext());
 	            bombModel->setMeshSource("GravityBomb.mesh"); //Demo Model from SimpleRocket
@@ -47,4 +47,17 @@
 				this->attach(bombModel);
 
+				//Add particle effect to the flying rockets.
+				ParticleEmitter* fire = new ParticleEmitter(this->getContext());
+				fire->setOrientation(this->getOrientation());
+				fire->setSource("Orxonox/simplerocketfire");
+				this->attach(fire);
+
+				//Add sound effect while the bomb is flying.
+				WorldSound* bombSound = new WorldSound(context);
+				bombSound->setSource("sounds/GravityBombFlight.ogg");
+				bombSound->setLooping(true);
+				bombSound->setVolume(1.0);
+				this->attach(bombSound);
+				bombSound->play();
 			}
 		}
@@ -57,13 +70,12 @@
 			if(timeToLife_ < 0)
 			{
-				orxout(debug_output) << "bomb has stoped moving" <<endl;
-				setVelocity(Vector3::ZERO);
-				setAcceleration(Vector3::ZERO);
+				//orxout(debug_output) << "bomb has stoped moving" <<endl;
+				setVelocity(Vector3::ZERO); //Stop the bomb.
 				isDetonated_ = true;
 			}
 			else
 			{
-				orxout(debug_output)<< "Time to live:" << timeToLife_ <<endl;
-				destroyCheck();
+				//orxout(debug_output)<< "Time to live:" << timeToLife_ <<endl;
+				destroyCheck(); //Every BasicProjectil has to call this method in each tick.
 			}
 			if(isDetonated_) detonate();
@@ -73,5 +85,5 @@
 	bool GravityBomb::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint)
 	{
-		if(otherObject != getShooter())
+		if(otherObject != getShooter()) //Ensure that the bomb cannot collide with its shooter.
 		{
 			orxout(debug_output) << "collides" << endl;
@@ -81,5 +93,5 @@
 		}
 		else{
-			orxout(debug_output) << "collided with shooter. Has no effect..." << endl;
+			//orxout(debug_output) << "collided with shooter. Has no effect..." << endl;
 			return false;
 		}
@@ -88,9 +100,10 @@
 	void GravityBomb::detonate()
 	{
+		//Create the GravityBombField and destroy the Projectil.
 		GravityBombField* field = new GravityBombField(this->getContext());
 		field->setShooter(this->getShooter());
 		field->setPosition(getPosition());
-		orxout(debug_output) << "detonating. Creating GravityBombField." <<endl;
-		orxout(debug_output) << "Field is at Position: " << getPosition() << endl;
+		//orxout(debug_output) << "detonating. Creating GravityBombField." <<endl;
+		//orxout(debug_output) << "Field is at Position: " << getPosition() << endl;
 		this->destroy();
 	}
Index: code/branches/weaponFS15/src/modules/weapons/projectiles/GravityBomb.h
===================================================================
--- code/branches/weaponFS15/src/modules/weapons/projectiles/GravityBomb.h	(revision 10436)
+++ code/branches/weaponFS15/src/modules/weapons/projectiles/GravityBomb.h	(revision 10455)
@@ -1,31 +1,2 @@
-/*
- *   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:
- *      Gabriel Nadler
- *   Co-authors:
- *      simonmie
- *
- */
-
-
 /*
  * GravityBomb.h
@@ -51,8 +22,18 @@
 #include "../../../orxonox/worldentities/WorldEntity.h"
 #include "GravityBombField.h"
+#include "sound\WorldSound.h"
 
 namespace orxonox
 {
-
+	/**
+	 * @class	GravityBomb
+	 *
+	 * @brief	This class implements how long the bomb flies before it places the GravityField at it's last possition.
+	 * 			The field will be created either because the timelimit of the bomb expired or it hit something. After creation of the field,
+	 * 			the projectile (this object) is destroyed.
+	 *
+	 * @author	Manuel Eggimann
+	 * @date	23.05.2015
+	 */
 	class _WeaponsExport GravityBomb : public BasicProjectile , public MovableEntity, public RadarViewable
 	{
@@ -69,5 +50,5 @@
 		bool isDetonated_; //Used to check whether the Bomb has to be destroyed during next tick.
 		float timeToLife_; //Time the bomb flies before it explodes.
-
+		WorldSound* bombSound_;
 	};
 }
Index: code/branches/weaponFS15/src/modules/weapons/projectiles/GravityBombField.cc
===================================================================
--- code/branches/weaponFS15/src/modules/weapons/projectiles/GravityBombField.cc	(revision 10436)
+++ code/branches/weaponFS15/src/modules/weapons/projectiles/GravityBombField.cc	(revision 10455)
@@ -3,5 +3,5 @@
  *
  *  Created on: Apr 2, 2015
- *      Author: meggiman
+ *      Author: Manuel Eggimann
  */
 
@@ -12,19 +12,24 @@
 	RegisterClass(GravityBombField);
 
-	const float GravityBombField::FORCE_FIELD_LIFETIME = 20;
+	//Change these constants to alter the behaviour of the field.
+	
+	const float GravityBombField::FORCE_FIELD_LIFETIME = 15;
 	const float GravityBombField::FORCE_SPHERE_START_RADIUS = 250;
 	const float GravityBombField::FORCE_SPHERE_START_STRENGTH = -500;
-	const float GravityBombField::PEAK_EXPLOSION_FORCE = 1e6;
+	const float GravityBombField::PEAK_EXPLOSION_FORCE = 5e4;
 	const float GravityBombField::FORCE_FIELD_EXPLOSION_DAMMAGE = 100;
 	const float GravityBombField::EXPLOSION_DURATION = 1;
-	const float GravityBombField::EXPLOSION_RADIUS = 400;
+	const float GravityBombField::EXPLOSION_RADIUS = 600;
 	const float GravityBombField::PEAK_ANGULAR_VELOCITY = 20;
+	const float GravityBombField::CENTRE_MODEL_END_SIZE = 1.5;
 
 	GravityBombField::GravityBombField(Context* context) : ForceField(context),RadarViewable(this, static_cast<WorldEntity*>(this))
 	{
 		RegisterObject(GravityBombField);
+		//Initialize variable with their initial values.
 		lifetime_=FORCE_FIELD_LIFETIME;
 		forceStrength_ = FORCE_SPHERE_START_STRENGTH;
 		forceSphereRadius_ = FORCE_SPHERE_START_RADIUS;
+		modelScaling_ = 1;
 		fieldExploded_ = false;
 
@@ -34,24 +39,28 @@
 		setCollisionResponse(false);
 
+		//Make the Field visible on Radar and minimap.
 		this->setRadarObjectColour(ColourValue(0.2, 0.2, 1.0,1)); // Blue
 		this->setRadarObjectShape(RadarViewable::Dot);
 		this->setRadarObjectScale(0.5f);
+		
 
 		//Attach Model
 		Model* model = new Model(this->getContext());
 		model->setMeshSource("GravityBomb.mesh"); //Demo Model from SimpleRocket
-		model->scale(3.0f);
+		model->scale(2.5f);
 		bombModel_ = new MovableEntity(context);
 		bombModel_->attach(model);
 		this->attach(bombModel_);
 
-		Backlight* centreLight = new Backlight(context);
-		centreLight->setColour(ColourValue(0.9,0.5,0.5,1));
-		centreLight->setScale(1.0);
-		centreLight->setTrailMaterial("Trail/backlighttrail");
-		centreLight->setMaterial("Examples/Flare");
-		centreLight->setLifetime(20);
-		bombModel_->attach(centreLight);
+		//Add a Backlight to the centre.
+		centreLight_ = new Backlight(context);
+		centreLight_->setColour(ColourValue(0.2,0.9,0.2,1));
+		centreLight_->setScale(0.3);
+		centreLight_->setTrailMaterial("Trail/backlighttrail");
+		centreLight_->setMaterial("Examples/Flare");
+		centreLight_->setLifetime(20);
+		bombModel_->attach(centreLight_);
 
+		//Let the Bomb Modell in the centre rotate in a random direction.
 		Vector3 randomRotation;
 		srand(time(NULL));
@@ -64,14 +73,24 @@
 		//Add Collision Shape
 		SphereCollisionShape* collisionShape = new SphereCollisionShape(context);
-		collisionShape->setRadius(3.0);
+		collisionShape->setRadius(10.0);
 		this->attachCollisionShape(collisionShape);
 
+		//Add particle effect to visualize the force field.
 		this->particleSphere_ = new ParticleEmitter(this->getContext());
 		this->attach(this->particleSphere_);
 		particleSphere_->setSource("Orxonox/GravityBombField");
+
+		//Add a sound effect to the field.
+		WorldSound* fieldSound = new WorldSound(context);
+		fieldSound->setSource("sounds/GravityField.ogg");
+		fieldSound->setLooping(true);
+		fieldSound->setVolume(1.0);
+		this->attach(fieldSound);
+		fieldSound->play();
 	}
 
 	GravityBombField::~GravityBombField(){}
 
+	
 	void GravityBombField::tick(float dt)
 	{
@@ -79,6 +98,7 @@
 		lifetime_-=dt;
 
-		if(lifetime_ > EXPLOSION_DURATION)
+		if(lifetime_ > EXPLOSION_DURATION)//If field is still alive, make it smaller and stronger.
 		{
+			modelScaling_ += ((CENTRE_MODEL_END_SIZE-1) / FORCE_FIELD_LIFETIME)*dt;
 			forceStrength_ *= (1+dt/10);
 			forceSphereRadius_ = FORCE_SPHERE_START_RADIUS*(1-((FORCE_FIELD_LIFETIME-lifetime_)/FORCE_FIELD_LIFETIME)*((FORCE_FIELD_LIFETIME-lifetime_)/FORCE_FIELD_LIFETIME)*((FORCE_FIELD_LIFETIME-lifetime_)/FORCE_FIELD_LIFETIME));
@@ -86,28 +106,37 @@
 		else if(lifetime_ > 0)
 		{
-			if (!fieldExploded_)
+			if (!fieldExploded_) // Start the field explosion if it has not been started yet.
 			{
-				forceStrength_ = PEAK_EXPLOSION_FORCE;
+				forceStrength_ = pow((EXPLOSION_DURATION + lifetime_),4)/EXPLOSION_DURATION * PEAK_EXPLOSION_FORCE;
 				fieldExploded_ = true;
 
+				//Add particle effect to visualize explosion
 				explosionCross_ = new ParticleEmitter(this->getContext());
+				explosionCross_->setSource("Orxonox/FieldExplosion");
+				explosionCross_->setOrientation(rand(), rand(), rand(), rand());
+				explosionCross_->setScale(0.7);
 				this->attach(explosionCross_);
-				explosionCross_->setSource("Orxonox/FieldExplosion");
+
+				//Add explosion sound effect.
+				explosionSound_ = new WorldSound(getContext());
+				explosionSound_->setSource("sounds/GravityFieldExplosion.ogg");
+				explosionSound_->setVolume(1.0);
+				explosionSound_->play();
 			}
 
+			//Check if any pawn is inside the shockwave and hit it with dammage proportional to the distance between explosion centre and pawn. Make sure, the same pawn is damaged only once.
 			for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); ++it)
 			{
 				Vector3 distanceVector = it->getWorldPosition()-this->getWorldPosition();
-				 orxout(debug_output) << "Found Pawn:" << it->getWorldPosition() << endl;
+				 //orxout(debug_output) << "Found Pawn:" << it->getWorldPosition() << endl;
 				if(distanceVector.length()< forceSphereRadius_)
 				 {
-					 orxout(debug_output) << "Force sphere radius is: " << forceSphereRadius_ << " Distance to Pawn is: " << distanceVector.length();
+					 //orxout(debug_output) << "Force sphere radius is: " << forceSphereRadius_ << " Distance to Pawn is: " << distanceVector.length();
 					 if (std::find(victimsAlreadyDamaged_.begin(),victimsAlreadyDamaged_.end(),*it) == victimsAlreadyDamaged_.end())
 					 {
-						 orxout(debug_output) << "Found Pawn to damage: " << it->getWorldPosition() << endl;
+						 //orxout(debug_output) << "Found Pawn to damage: " << it->getWorldPosition() << endl;
 						 float damage = FORCE_FIELD_EXPLOSION_DAMMAGE*(1-distanceVector.length()/EXPLOSION_RADIUS);
-						 orxout(debug_output) << "Damage: " << damage << endl;
+						 //orxout(debug_output) << "Damage: " << damage << endl;
 						 it->hit(shooter_, it->getWorldPosition(), NULL, damage, 0,0);
-//						 it->removeHealth(damage);
 						 victimsAlreadyDamaged_.push_back(*it);
 					 }
@@ -118,6 +147,7 @@
 			explosionCross_->setScale(forceSphereRadius_/FORCE_SPHERE_START_RADIUS);
 		}
-		else if (lifetime_ > -4)
+		else if (lifetime_ > -6) //The field has to exist for 6 more seconds for the particles of the particle effect to vanish smoothly.
 		{
+			//Make the bomb model invisible, let the strength of the field be zero and remove all particle emitters so the particle effect will slowly vanish.
 			bombModel_->setVisible(false);
 			this->setRadarVisibility(false);
@@ -127,8 +157,9 @@
 			explosionCross_->getParticleInterface()->removeAllEmitters();
 		}
-
+		
 		setDiameter(forceSphereRadius_*2);
 		setVelocity(forceStrength_);
-		particleSphere_->setScale(forceSphereRadius_/FORCE_SPHERE_START_RADIUS);
+		if(lifetime_>0) particleSphere_->setScale(forceSphereRadius_/FORCE_SPHERE_START_RADIUS);
+		bombModel_->setScale(modelScaling_);
 
 		if (lifetime_ <= -4)
@@ -141,5 +172,4 @@
 	void GravityBombField::destroy()
 	{
-		//Animation
 		ForceField::destroy();
 	}
Index: code/branches/weaponFS15/src/modules/weapons/projectiles/GravityBombField.h
===================================================================
--- code/branches/weaponFS15/src/modules/weapons/projectiles/GravityBombField.h	(revision 10436)
+++ code/branches/weaponFS15/src/modules/weapons/projectiles/GravityBombField.h	(revision 10455)
@@ -20,7 +20,19 @@
 #include <stdlib.h>
 #include <time.h>
+#include <math.h>
 #include "graphics/Backlight.h"
+#include "sound\WorldSound.h"
 
 namespace orxonox {
+
+/**
+ * @class	GravityBombField
+ *
+ * @brief	This class is used by GravityBomb to place the ForceField and Visual effect to the environment.
+ * 			The field has a maximum lifetime and gets smaller and stronger the more time passes. In the end, the field explodes and damages all pawns nearby.
+ *
+ * @author	Manuel Eggimann
+ * @date	23.05.2015
+ */
 class GravityBombField: public ForceField, public RadarViewable {
 public:
@@ -30,4 +42,14 @@
 	virtual void destroy();
 
+	/**
+	 * @fn	void GravityBombField::setShooter(Pawn* shooter)
+	 *
+	 * @brief	This function is used to determine save the pawn who created the field and is used inside the GravityBomb class.
+	 *
+	 * @author	Manuel Eggimann
+	 * @date	23.05.2015
+	 *
+	 * @param [in,out]	the Pawn that created the field.
+	 */
 	void setShooter(Pawn* shooter)
 	{ this->shooter_ = shooter; }
@@ -37,16 +59,20 @@
 
 private:
-	static const float FORCE_FIELD_LIFETIME;
-	static const float FORCE_SPHERE_START_RADIUS;
-	static const float FORCE_SPHERE_START_STRENGTH;
-	static const float FORCE_FIELD_EXPLOSION_DAMMAGE;
-	static const float EXPLOSION_DURATION;
-	static const float EXPLOSION_RADIUS;
-	static const float PEAK_ANGULAR_VELOCITY;
-	static const float PEAK_EXPLOSION_FORCE;
+	//Set these constants inside GravityBombField.cc to alter the behaviour of the field.
+	
+	static const float FORCE_FIELD_LIFETIME;	///< The lifetime of the ForceField in seconds. After lifetime seconds, has already exploded and the particle effects will start to vanish. 
+	static const float FORCE_SPHERE_START_RADIUS;   ///< The initial sphere radius of the Force Field. The forcefield gets smaller by time.
+	static const float FORCE_SPHERE_START_STRENGTH; ///< The initial Force the Field exerts on every object with non-zero mass.
+	static const float FORCE_FIELD_EXPLOSION_DAMMAGE;   ///< The maximum dammage a pawn gets nearby an exploding field. The farer away from explosion center the smaller the dammage.
+	static const float EXPLOSION_DURATION;  ///< Determines how fast the shockwave of the Explosion expands. It takes GravityBombField::EXPLOSION_DURATION seconds for the field to expand from 0 radius to GravityBombField::EXPLOSION_RADIUS.
+	static const float EXPLOSION_RADIUS;	///< How far does the shockwave reach. All pawns which outside of a sphere witch this radius rest unharmed by the explosion.
+	static const float PEAK_ANGULAR_VELOCITY;   ///< The model of the bomb in the center of the Field does rotate faster and faster as time passes until it reaches PEAK_ANGULAR_VELOCITY at the fields end of life.
+	static const float PEAK_EXPLOSION_FORCE;	///< The peak force the explosion exerts on the pawns nearby.
+	static const float CENTRE_MODEL_END_SIZE;   ///< Size of the 3d-model of the bomb in the fields centre.
 
 	float forceSphereRadius_;
 	float forceStrength_;
 	float lifetime_;
+	float modelScaling_;
 	Vector3 rotationVector_;
 	bool fieldExploded_;
@@ -56,4 +82,6 @@
 	MovableEntity * bombModel_;
 	Pawn* shooter_;
+	Backlight* centreLight_;
+	WorldSound* explosionSound_;
 };
 
