Index: branches/ai/src/ai/Makefile
===================================================================
--- branches/ai/src/ai/Makefile	(revision 10044)
+++ branches/ai/src/ai/Makefile	(revision 10045)
@@ -15,5 +15,5 @@
 
 
-
+SOURCES = $(libORXai_a_SOURCES) 
 srcdir = .
 top_srcdir = ../..
Index: branches/ai/src/ai/Makefile.in
===================================================================
--- branches/ai/src/ai/Makefile.in	(revision 10044)
+++ branches/ai/src/ai/Makefile.in	(revision 10045)
@@ -15,5 +15,5 @@
 @SET_MAKE@
 
-
+SOURCES = $(libORXai_a_SOURCES) 
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
Index: branches/ai/src/ai/ai_engine.cc
===================================================================
--- branches/ai/src/ai/ai_engine.cc	(revision 10044)
+++ branches/ai/src/ai/ai_engine.cc	(revision 10045)
@@ -55,10 +55,12 @@
 
 
-void AIEngine::process()
+void AIEngine::tick(float dtS)
 {
+	this->dtS=dtS;
 	int teamCount=teams.size();
 	for(int i=0; i < teamCount; i++ )
 	{
-   	//std::cout << "Processing Team " << i <<  "...\n";
+		//std::cout << "hello";
+   	//std::cout << "DT " << dtS <<  "...\n";
    	teams.at(i)->process();
 	}
Index: branches/ai/src/ai/ai_engine.h
===================================================================
--- branches/ai/src/ai/ai_engine.h	(revision 10044)
+++ branches/ai/src/ai/ai_engine.h	(revision 10045)
@@ -13,7 +13,8 @@
    static AIEngine* getInstance() { if( singletonRef == NULL) singletonRef = new AIEngine(); return singletonRef; }
 
-   void process();
+   void tick(float dtS);
    AITeam* getTeam(int);
 	int newTeam();
+	float dtS;
  private:
 	AIEngine();
Index: branches/ai/src/ai/ai_module.cc
===================================================================
--- branches/ai/src/ai/ai_module.cc	(revision 10044)
+++ branches/ai/src/ai/ai_module.cc	(revision 10045)
@@ -12,21 +12,43 @@
 
    ### File Specific:
-   main-programmer: Patrick Boenzli
+   main-programmer: Thomas Fahrni
    co-programmer:
 */
-#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_AI
 
 #include "ai_module.h"
+#include "ai_engine.h"
+#include "debug.h"
 
 
-AIModule::AIModule(){
-}
 
-AIModule::~AIModule(){
+AIModule::AIModule()
+{
 }
 
 
-void AIModule::process()
-{}
+AIModule::~AIModule()
+{
+}
 
 
+
+void AIModule::process()
+{
+std::cout << "Processing Module...\n";
+}
+
+
+
+void AIModule::setDifficulty(int newDifficulty)
+{
+	difficulty=newDifficulty;
+}
+
+
+
+void AIModule::setOwner(AITeamMember* newOwner)
+{
+	owner=newOwner;
+}
+
Index: branches/ai/src/ai/ai_module.h
===================================================================
--- branches/ai/src/ai/ai_module.h	(revision 10044)
+++ branches/ai/src/ai/ai_module.h	(revision 10045)
@@ -3,4 +3,5 @@
 #define _AI_MODULE_H
 
+class AITeamMember;
 
 class AIModule{
@@ -9,6 +10,9 @@
    ~AIModule();
    void process();
+   void setDifficulty(int newDifficulty);
+   void setOwner(AITeamMember* newOwner);
  private:
    int difficulty;
+   AITeamMember* owner;
 };
 
Index: branches/ai/src/ai/ai_team.cc
===================================================================
--- branches/ai/src/ai/ai_team.cc	(revision 10044)
+++ branches/ai/src/ai/ai_team.cc	(revision 10045)
@@ -12,5 +12,5 @@
 
    ### File Specific:
-   main-programmer: Patrick Boenzli
+   main-programmer: Thomas Fahrni
    co-programmer:
 */
Index: branches/ai/src/ai/ai_team_member.cc
===================================================================
--- branches/ai/src/ai/ai_team_member.cc	(revision 10044)
+++ branches/ai/src/ai/ai_team_member.cc	(revision 10045)
@@ -16,5 +16,8 @@
 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_AI
 #include "ai_team_member.h"
+#include "movement_module.h"
 #include "ai_engine.h"
+#include "debug.h"
+
 
 AITeamMember::AITeamMember()
@@ -31,5 +34,5 @@
 	for(int i=0; i < moduleCount; i++ )
 	{
-   	std::cout << "Processing AIModule " << i <<  "...\n";
+   	std::cout << "Processing AIModule " << i << " (" << moduleCount << ")\n";
    	modules.at(i)->process();
 	}
@@ -41,8 +44,12 @@
 void AITeamMember::addToTeam(int aiTeamNumber)
 {
-	//funktionniert nur so pseudomässig...
+	//macht nicht so ganz das was es eigntlich machen sollte..
 	AIEngine* aiEngine=AIEngine::getInstance();
 	int teamNumber=aiEngine->newTeam();
 	aiEngine->getTeam(teamNumber)->addMember(this);
+	MovementModule* nMod=new MovementModule;
+	nMod->process();
+	modules.push_back(nMod);
+	modules.at(0)->process();
 }
 
@@ -50,5 +57,8 @@
 
 
-void AITeamMember::addModule(AIModule* newModule){
+void AITeamMember::addModule(AIModule* newModule)
+{
+		std::cout << "AIModule added\n";
 		modules.push_back(newModule);
+		newModule->setOwner(this);
 }
Index: branches/ai/src/ai/ai_team_member.h
===================================================================
--- branches/ai/src/ai/ai_team_member.h	(revision 10044)
+++ branches/ai/src/ai/ai_team_member.h	(revision 10045)
@@ -6,4 +6,5 @@
 #include "ai_module.h"
 
+//class AIModule;
 
 class AITeamMember : public WorldEntity{
Index: branches/ai/src/ai/movement_module.cc
===================================================================
--- branches/ai/src/ai/movement_module.cc	(revision 10044)
+++ branches/ai/src/ai/movement_module.cc	(revision 10045)
@@ -1,4 +1,2 @@
-
-
 /*
    orxonox - the future of 3D-vertical-scrollers
@@ -12,12 +10,18 @@
 
    ### File Specific:
-   main-programmer: Patrick Boenzli
+   main-programmer: Thomas Fahrni
    co-programmer:
 */
-#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_AI
 
 #include "movement_module.h"
+#include "ai_engine.h"
+#include "state.h"
+#include "debug.h"
+
+//class AIEngine;
 
 MovementModule::MovementModule(){
+	//std::cout << "MovementModule created...\n";
 }
 
@@ -28,15 +32,18 @@
 void MovementModule::process()
 {
+	//float dt=AIEngine::getInstance()->dtS;
+	std::cout << "///////////////////Processing Movement Module/////////////////////\n";
 
 	//How does the Module know the AITeamMember it belongs to??
-	
-	/*Vector absPosition = this->getAbsCoor();
+	//partialy solved...
+	/*
+	Vector absPosition = owner->getAbsCoor();
 
 	PRINTF(0)(" npc abs coor: %f, %f, %f\n", absPosition.x, absPosition.y, absPosition.z);
 
-	Player* pl = State::getPlayer();
-	Vector playerAbsPos = pl->getPlayable()->getAbsCoor();
+	//Player* pl = State::getPlayer();
+	/*Vector playerAbsPos = pl->getPlayable()->getAbsCoor();
 
-	PRINTF(0)(" player abs coor: %f, %f, %f\n", playerAbsPos.x, playerAbsPos.y, playerAbsPos.z);
+	//PRINTF(0)(" player abs coor: %f, %f, %f\n", playerAbsPos.x, playerAbsPos.y, playerAbsPos.z);
 
 
@@ -48,5 +55,5 @@
 	float speed = 10.0f;
 
-	this->shiftCoor( distanceVector * speed * dt);*/
+	owner->shiftCoor( distanceVector * speed * dt);*/
 }
 
Index: branches/ai/src/ai/movement_module.h
===================================================================
--- branches/ai/src/ai/movement_module.h	(revision 10044)
+++ branches/ai/src/ai/movement_module.h	(revision 10045)
@@ -11,4 +11,5 @@
    virtual void process();
  private:
+	//AITeamMember* owner;
 };
 
Index: branches/ai/src/ai/shooting_module.cc
===================================================================
--- branches/ai/src/ai/shooting_module.cc	(revision 10044)
+++ branches/ai/src/ai/shooting_module.cc	(revision 10045)
@@ -12,10 +12,11 @@
 
    ### File Specific:
-   main-programmer: Patrick Boenzli
+   main-programmer: Thomas Fahrni
    co-programmer:
 */
-#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_AI
+#include "debug.h"
+#include "shooting_module.h"
 
-#include "shooting_module.h"
 
 ShootingModule::ShootingModule()
@@ -28,5 +29,8 @@
 
 void ShootingModule::process()
-{}
+{
+	//std::cout << "Processing Shooting Module...\n";
+	return;
+}
 
 
Index: branches/ai/src/story_entities/game_world.cc
===================================================================
--- branches/ai/src/story_entities/game_world.cc	(revision 10044)
+++ branches/ai/src/story_entities/game_world.cc	(revision 10045)
@@ -505,5 +505,6 @@
 void GameWorld::checkAI()
 {
-  AIEngine::getInstance()->process();
+  AIEngine::getInstance()->tick(this->dtS);
+  //AIEngine::getInstance()->tick();
 }
 
Index: branches/ai/src/world_entities/npcs/npc_test.cc
===================================================================
--- branches/ai/src/world_entities/npcs/npc_test.cc	(revision 10044)
+++ branches/ai/src/world_entities/npcs/npc_test.cc	(revision 10045)
@@ -37,12 +37,10 @@
 
 
-NPC2::NPC2(const TiXmlElement* root)
-  : NPC(NULL)
+NPC2::NPC2(const TiXmlElement* root) : NPC(NULL)
 {
   this->registerObject(this, NPC2::_objectList);
 
+  if (root != NULL)this->loadParams(root);
 
-  if (root != NULL)this->loadParams(root);
-  
   addToTeam(0);
 }
@@ -56,8 +54,5 @@
 {
   NPC::loadParams(root);
-
 }
-
-
 
 
@@ -65,39 +60,7 @@
 void NPC2::tick(float dt)
 {
-	
-	
-  // animating the md2 model (uninteressant)
+  // animating the md2 model
   if( likely(this->getModel(0) != NULL))
     ((MD2Model*)this->getModel(0))->tick(dt);
-
-	return; 
-	//this things will now be managed by the AI modules..../////
-
-  PRINTF(0)("====================\n");
-  PRINTF(0)("NPC2::tick(%f)\n", dt);
-
-  // information gathering
-
-  Vector absPosition = this->getAbsCoor();
-
-  PRINTF(0)(" npc abs coor: %f, %f, %f\n", absPosition.x, absPosition.y, absPosition.z);
-
-  Player* pl = State::getPlayer();
-  Vector playerAbsPos = pl->getPlayable()->getAbsCoor();
-
-  PRINTF(0)(" player abs coor: %f, %f, %f\n", playerAbsPos.x, playerAbsPos.y, playerAbsPos.z);
-
-
-  // intelligent reaction
-
-  Vector distanceVector = playerAbsPos - absPosition;
-  distanceVector.normalize();
-
-  float speed = 10.0f;
-
-  this->shiftCoor( distanceVector * speed * dt);
-
-
-
 }
 
Index: branches/ai/src/world_entities/npcs/npc_test.h
===================================================================
--- branches/ai/src/world_entities/npcs/npc_test.h	(revision 10044)
+++ branches/ai/src/world_entities/npcs/npc_test.h	(revision 10045)
@@ -14,8 +14,5 @@
   NPC2 (const TiXmlElement* root);
   virtual ~NPC2 ();
-
   virtual void loadParams(const TiXmlElement* root);
-
-
   virtual void tick(float dt);
 
