Index: /trunk/src/defs/class_id.h
===================================================================
--- /trunk/src/defs/class_id.h	(revision 7460)
+++ /trunk/src/defs/class_id.h	(revision 7461)
@@ -133,4 +133,5 @@
   CL_GAME_WORLD_DATA            =    0x00102000,
   CL_GAME_RULES                 =    0x00104000,
+  CL_MISSION_GOAL               =    0x00105000,
 
   CL_CAMPAIGN                   =    0x00000101,
@@ -144,8 +145,10 @@
   CL_MOVIE_LOADER               =    0x00000109,
 
-  CL_MULTIPLAYER_TEAM_DEATHMATCH=    0x00000111,
-  CL_SINGLEPLAYER_SHOOTEMUP     =    0x00000112,
-
-  CL_MISSION_GOAL               =    0x00000113,
+  CL_MULTIPLAYER_TEAM_DEATHMATCH=    0x00104001,
+  CL_SINGLEPLAYER_SHOOTEMUP     =    0x00104002,
+
+  CL_KILL_TARGET                =    0x00105001,
+
+
 
   /// SUPER-PNodes
Index: /trunk/src/story_entities/game_world_data.cc
===================================================================
--- /trunk/src/story_entities/game_world_data.cc	(revision 7460)
+++ /trunk/src/story_entities/game_world_data.cc	(revision 7461)
@@ -379,11 +379,13 @@
   while( element != NULL)
   {
-    PRINTF(4)("============ GameRules ==");
-    PRINTF(4)("creating %s\n", element->Value());
+    PRINTF(2)("============ GameRules ==\n");
+    PRINTF(2)("creating %s\n", element->Value());
     BaseObject* created = Factory::fabricate(element);
-    if (created != NULL /*&& created->isA(CL_GAME_RULES)*/)
+    if (created != NULL && created->isA(CL_GAME_RULES))
     {
       this->gameRule = dynamic_cast<GameRules*>(created);
       State::setGameRules(this->gameRule);
+      // if there is a valid game rule loaded, break because it is not thought to load multiple game rules
+      break;
     }
     else
Index: /trunk/src/util/Makefile.am
===================================================================
--- /trunk/src/util/Makefile.am	(revision 7460)
+++ /trunk/src/util/Makefile.am	(revision 7461)
@@ -8,8 +8,12 @@
 			state.cc \
 			hud.cc \
+			\
 			game_rules.cc \
-			mission_goal.cc\
 			multiplayer_team_deathmatch.cc \
 			singleplayer_shootemup.cc \
+			\
+			mission_goal.cc\
+			kill_target.cc\
+			\
 			signal_handler.cc \
 			\
@@ -27,8 +31,11 @@
 			state.h \
 			hud.h \
+			\
 			game_rules.h \
-			mission_goal.h \
 			multiplayer_team_deathmatch.h \
 			singleplayer_shootemup.h \
+			\
+			mission_goal.cc\
+			kill_target.h\
 			signal_handler.h \
 			\
Index: /trunk/src/util/game_rules.cc
===================================================================
--- /trunk/src/util/game_rules.cc	(revision 7460)
+++ /trunk/src/util/game_rules.cc	(revision 7461)
@@ -18,4 +18,8 @@
 
 #include "util/loading/load_param.h"
+#include "util/loading/factory.h"
+
+#include "util/mission_goal.h"
+
 
 
@@ -42,4 +46,33 @@
 {
   BaseObject::loadParams(root);
+
+  LoadParamXML(root, "MissionGoal", this, GameRules, loadMissionGoal)
+      .describe("an XML-Element to load the missions from");
 }
 
+
+
+void GameRules::loadMissionGoal(const TiXmlElement* root)
+{
+  const TiXmlElement* element = root->FirstChildElement();
+  while( element != NULL)
+  {
+    PRINTF(2)("============ MissionGoal\n");
+    PRINTF(2)("Adding Mission Goal:%s\n", element->Value());
+    BaseObject* created = Factory::fabricate(element);
+    if (created != NULL && created->isA(CL_GAME_RULES))
+    {
+      MissionGoal* mg = dynamic_cast<MissionGoal*>(created);
+      this->addMissionGoal(mg);
+      // if there is a valid game rule loaded, break because it is not thought to load multiple game rules
+      break;
+    }
+    else
+    {
+      PRINTF(1)("Could not create a %s\n", element->Value());
+      delete created;
+    }
+    element = element->NextSiblingElement();
+  }
+}
+
Index: /trunk/src/util/game_rules.h
===================================================================
--- /trunk/src/util/game_rules.h	(revision 7460)
+++ /trunk/src/util/game_rules.h	(revision 7461)
@@ -26,4 +26,5 @@
 
     virtual void loadParams(const TiXmlElement* root = NULL);
+    void loadMissionGoal(const TiXmlElement* root = NULL);
 
 
Index: /trunk/src/util/kill_target.cc
===================================================================
--- /trunk/src/util/kill_target.cc	(revision 7461)
+++ /trunk/src/util/kill_target.cc	(revision 7461)
@@ -0,0 +1,55 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   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, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Patrick Boenzli
+   co-programmer: ...
+*/
+
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GAME_RULES
+
+#include "kill_target.h"
+
+using namespace std;
+
+
+/**
+ * standard constructor
+ * @todo this constructor is not jet implemented - do it
+*/
+KillTarget::KillTarget (const TiXmlElement* root)
+  : MissionGoal(root)
+{
+  this->setClassID(CL_KILL_TARGET, "KillTarget");
+
+  PRINTF(0)("Created a KillTarget Mission Goal <==================================\n");
+
+  if( root != NULL)
+    this->loadParams(root);
+}
+
+
+/**
+ * standard deconstructor
+*/
+KillTarget::~KillTarget ()
+{
+
+}
+
+
+void KillTarget::loadParams(const TiXmlElement* root)
+{
+  MissionGoal::loadParams(root);
+}
+
+
+MissionState KillTarget::checkMissionGoal()
+{}
Index: /trunk/src/util/kill_target.h
===================================================================
--- /trunk/src/util/kill_target.h	(revision 7461)
+++ /trunk/src/util/kill_target.h	(revision 7461)
@@ -0,0 +1,32 @@
+/*!
+ * @file mission_goal.h
+ * @brief Definition of a killtarget mission goal
+*/
+
+#ifndef _KILL_TARGET_H
+#define _KILL_TARGET_H
+
+#include "mission_goal.h"
+
+
+class TiXmlElement;
+
+
+
+//! A class representing a mission goal to kill a specific amount of a specific object type
+class KillTarget : public MissionGoal {
+
+ public:
+  KillTarget(const TiXmlElement* root);
+  virtual ~KillTarget();
+
+  virtual void loadParams(const TiXmlElement* root);
+
+  virtual MissionState checkMissionGoal();
+
+
+ protected:
+
+};
+
+#endif /* _KILL_TARGET_H */
Index: /trunk/src/util/mission_goal.cc
===================================================================
--- /trunk/src/util/mission_goal.cc	(revision 7460)
+++ /trunk/src/util/mission_goal.cc	(revision 7461)
@@ -25,7 +25,10 @@
  * @todo this constructor is not jet implemented - do it
 */
-MissionGoal::MissionGoal ()
+MissionGoal::MissionGoal (const TiXmlElement* root)
 {
    this->setClassID(CL_MISSION_GOAL, "MissionGoal");
+
+   if( root != NULL)
+     this->loadParams(root);
 }
 
@@ -38,2 +41,8 @@
 
 }
+
+
+void MissionGoal::loadParams(const TiXmlElement* root)
+{
+  BaseObject::loadParams(root);
+}
Index: /trunk/src/util/mission_goal.h
===================================================================
--- /trunk/src/util/mission_goal.h	(revision 7460)
+++ /trunk/src/util/mission_goal.h	(revision 7461)
@@ -27,5 +27,5 @@
 
  public:
-  MissionGoal();
+  MissionGoal(const TiXmlElement* root);
   virtual ~MissionGoal();
 
Index: /trunk/src/util/signal_handler.cc
===================================================================
--- /trunk/src/util/signal_handler.cc	(revision 7460)
+++ /trunk/src/util/signal_handler.cc	(revision 7461)
@@ -15,4 +15,5 @@
 
 #include "signal_handler.h"
+#include <assert.h>
 
 #ifndef __WIN32__
@@ -28,5 +29,5 @@
   this->type = type;
   this->appName = appName;
-  
+
   catchSignal( SIGSEGV );
   catchSignal( SIGABRT );
@@ -75,5 +76,5 @@
 
   assert( pipe(fd) != -1 );
-  
+
   int pid = fork();
 
@@ -86,5 +87,5 @@
     sleep(2);
 
-    
+
     return;
   }
@@ -98,5 +99,5 @@
       exit(0);
     }
-    
+
     char command[256];
     if ( getInstance()->type == GDB_RUN_WRITE_TO_FILE )
Index: /trunk/src/util/singleplayer_shootemup.cc
===================================================================
--- /trunk/src/util/singleplayer_shootemup.cc	(revision 7460)
+++ /trunk/src/util/singleplayer_shootemup.cc	(revision 7461)
@@ -49,4 +49,5 @@
   this->setClassID(CL_SINGLEPLAYER_SHOOTEMUP, "SingleplayerShootemup");
 
+  PRINTF(0)("Created a SinglePlayer Shootemup game\n");
 
   if( root != NULL)
