Index: orxonox/branches/chris/src/message_structures.h
===================================================================
--- orxonox/branches/chris/src/message_structures.h	(revision 2189)
+++ orxonox/branches/chris/src/message_structures.h	(revision 2192)
@@ -26,3 +26,12 @@
 } Command;
 
+enum DAMAGETYPE{ DMG_ENERY};
+
+//! structure that contains a damage message
+typedef struct
+{
+	DAMAGETYPE type;	//!< The type of the damage delivered
+	float dmg; //!< The amount of damage delivered
+} Damage;
+
 #endif
Index: orxonox/branches/chris/src/player.cc
===================================================================
--- orxonox/branches/chris/src/player.cc	(revision 2189)
+++ orxonox/branches/chris/src/player.cc	(revision 2192)
@@ -47,5 +47,5 @@
 }
 
-void Player::hit (WorldEntity* weapon, Vector loc)
+void Player::hit (Damage* dmg, WorldEntity* instigator, Uint32 hitflags)
 {
 }
Index: orxonox/branches/chris/src/player.h
===================================================================
--- orxonox/branches/chris/src/player.h	(revision 2189)
+++ orxonox/branches/chris/src/player.h	(revision 2192)
@@ -20,5 +20,5 @@
 	virtual void post_spawn ();
   virtual void tick (float time);
-  virtual void hit (WorldEntity* weapon, Vector loc);
+  virtual void hit (Damage* dmg, WorldEntity* instigator, Uint32 hitflags);
   virtual void destroy ();
   virtual void collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags);
Index: orxonox/branches/chris/src/world.cc
===================================================================
--- orxonox/branches/chris/src/world.cc	(revision 2189)
+++ orxonox/branches/chris/src/world.cc	(revision 2192)
@@ -70,5 +70,5 @@
 				{
 					unsigned long ahitflg, bhitflg;
-					if( check_collision ( &aobj->place, aobj->collisioncluster, &ahitflg, &bobj->place, bobj->collisioncluster, &bhitflg));
+					if( check_collision ( &aobj->place, aobj->collisioncluster, &ahitflg, &bobj->place, bobj->collisioncluster, &bhitflg))
 					{
 						aobj->collide (bobj, ahitflg, bhitflg);
@@ -183,7 +183,7 @@
 		 	else
 		 	{
-		 		while( track[t].map_coords( loc, plc))
+		 		while( track[t]->map_coords( loc, plc))
 		 		{
-		 			track[t].post_leave (entity);
+		 			track[t]->post_leave (entity);
 		 			if( loc->part >= tracklen)
 		 			{
@@ -192,5 +192,5 @@
 		 				break;
 		 			}
-		 			track[loc->part].post_enter (entity);
+		 			track[loc->part]->post_enter (entity);
 		 		}
 		 	}
@@ -227,5 +227,5 @@
 	}
 	
-	for( int i = 0; i < tracklen; i++) track[i].tick (seconds);
+	for( int i = 0; i < tracklen; i++) track[i]->tick (seconds);
 }
 
@@ -255,8 +255,8 @@
 	// create the tracks
 	tracklen = 6;
-	track = new Track[6];
+	track = new Track*[6];
 	for( int i = 0; i < tracklen; i++)
 	{
-		track[i] = Track( i, (i+1)%tracklen, &pathnodes[i], &pathnodes[(i+1)%tracklen]);
+		track[i] = new Track( i, (i+1)%tracklen, &pathnodes[i], &pathnodes[(i+1)%tracklen]);
 	}
 	
@@ -277,4 +277,57 @@
 void World::calc_camera_pos (Location* loc, Placement* plc)
 {
-  track[loc->part].map_camera (loc, plc);
-}
+  track[loc->part]->map_camera (loc, plc);
+}
+
+void World::explosion (Location* loc, Damage* dmg, float r, WorldEntity* instigator)
+{
+	Placement mapped;
+	
+	track[loc->part]->map_coords (loc, &mapped);
+	CollisionCluster boom( r, Vector(0,0,0));
+	
+	unsigned long boomflags, hflags;
+	List<WorldEntity> *a;
+	WorldEntity *aobj;
+	
+	a = entities->get_next();
+	
+	while( a != NULL)
+	{
+		aobj = a->get_object();
+		if( aobj->bCollide && aobj->collisioncluster != NULL)
+		{
+			hflags = 0;
+			if( check_collision ( &aobj->place, aobj->collisioncluster, &hflags, &mapped, &boom, &boomflags))
+			{
+				aobj->hit (dmg, instigator, hflags);
+			}
+		}
+		a = a->get_next();
+	}
+}
+
+void World::explosion (Placement* plc, Damage* dmg, float r, WorldEntity* instigator)
+{
+	CollisionCluster boom( r, Vector(0,0,0));
+	
+	unsigned long boomflags, hflags;
+	List<WorldEntity> *a;
+	WorldEntity *aobj;
+	
+	a = entities->get_next();
+	
+	while( a != NULL)
+	{
+		aobj = a->get_object();
+		if( aobj->bCollide && aobj->collisioncluster != NULL)
+		{
+			hflags = 0;
+			if( check_collision ( &aobj->place, aobj->collisioncluster, &hflags, plc, &boom, &boomflags))
+			{
+				aobj->hit (dmg, instigator, hflags);
+			}
+		}
+		a = a->get_next();
+	}
+}
Index: orxonox/branches/chris/src/world.h
===================================================================
--- orxonox/branches/chris/src/world.h	(revision 2189)
+++ orxonox/branches/chris/src/world.h	(revision 2192)
@@ -30,4 +30,7 @@
 	void calc_camera_pos (Location* loc, Placement* plc);
 	
+	void explosion (Location* loc, Damage* dmg, float r, WorldEntity* instigator);
+	void explosion (Placement* plc, Damage* dmg, float r, WorldEntity* instigator);
+	
 	void unload ();
 	
@@ -39,5 +42,5 @@
 	
 		// base level data
-	Track* track;
+	Track** track;
 	Uint32 tracklen;
 	Vector* pathnodes;
@@ -72,5 +75,5 @@
 	if (entity->bFree)
 	{
-		track[loc->part].map_coords( loc, entity->get_placement());
+		track[loc->part]->map_coords( loc, entity->get_placement());
 	}
 	entity->post_spawn ();
Index: orxonox/branches/chris/src/world_entity.cc
===================================================================
--- orxonox/branches/chris/src/world_entity.cc	(revision 2189)
+++ orxonox/branches/chris/src/world_entity.cc	(revision 2192)
@@ -94,7 +94,5 @@
 	Handle all stuff that should update with time inside this method (movement, animation, etc.)
 */
-void WorldEntity::tick(float time) 
-{
-}
+void WorldEntity::tick(float time) {}
 
 /**
@@ -103,7 +101,5 @@
    This is a central function of an entity: call it to let the entity painted to the screen. Just override this function with whatever you want to be drawn.
 */
-void WorldEntity::draw() 
-{
-}
+void WorldEntity::draw() {}
 
 /**
@@ -118,11 +114,13 @@
 
 /**
-   \brief this function is called, when the ship is hit by a waepon
-   \param weapon: the laser/rocket/shoot that hits.
-   \param loc: place where it is hit
-
-   calculate the damage depending
+   \brief this function is called when the entity takes damage
+   \param dmg: a pointer to a structure containing information about the damage
+   \param instigator: the world entity that dealt the damage
+   \param hitflags: an integer full of flags signifying the places the enitiy had been hit
+   
+   You're free to do what you want with the damage you register here. This function is called from World::explosion() when
+   dealing splash damage, but can be called from virtually anywhere you want.
 */
-void WorldEntity::hit(WorldEntity* weapon, Vector loc) {}
+void WorldEntity::hit (Damage* dmg, WorldEntity* instigator, Uint32 hitflags) {}
 
 /**
@@ -158,7 +156,5 @@
 	DO NOT place such code in the constructor, those variables are set AFTER the entity is constucted.
 */
-void WorldEntity::post_spawn ()
-{
-}
+void WorldEntity::post_spawn () {}
 
 /**
@@ -169,7 +165,5 @@
 	to send commands from one WorldEntity to another.
 */
-void WorldEntity::command (Command* cmd)
-{
-}
+void WorldEntity::command (Command* cmd) {}
 
 /**
@@ -180,7 +174,5 @@
 	to look at the location you return with this.
 */
-void WorldEntity::get_lookat (Location* locbuf)
-{
-}
+void WorldEntity::get_lookat (Location* locbuf) {}
 
 /**
@@ -190,5 +182,3 @@
 	place that is not in the world anymore. In both cases you might have to take extreme measures (a.k.a. call destroy).
 */
-void WorldEntity::left_world ()
-{
-}
+void WorldEntity::left_world () {}
Index: orxonox/branches/chris/src/world_entity.h
===================================================================
--- orxonox/branches/chris/src/world_entity.h	(revision 2189)
+++ orxonox/branches/chris/src/world_entity.h	(revision 2192)
@@ -31,5 +31,5 @@
 	virtual void post_spawn ();
   virtual void tick (float time);
-  virtual void hit (WorldEntity* weapon, Vector loc);
+  virtual void hit (Damage* dmg, WorldEntity* instigator, Uint32 hitflags);
   virtual void destroy ();
   virtual void collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags);
