Index: branches/ai/src/ai/ai_engine.cc
===================================================================
--- branches/ai/src/ai/ai_engine.cc	(revision 10348)
+++ branches/ai/src/ai/ai_engine.cc	(revision 10349)
@@ -50,5 +50,5 @@
 }
 
-void AIEngine::addAI(int teamNumber, int swarmNumber, WorldEntity* npc)
+void AIEngine::addAI(int teamNumber, int swarmNumber, WorldEntity* npc, float maxSpeed, float attackDistance)
 {
 	std::pair<std::map<int,AITeam*>::iterator,bool> p;
@@ -56,5 +56,5 @@
 	p=teams.insert(std::make_pair(teamNumber,newTeam));
 	if(!p.second)delete newTeam;
-	p.first->second->addAI(swarmNumber, npc);
+	p.first->second->addAI(swarmNumber, npc, maxSpeed, attackDistance);
 }
 
Index: branches/ai/src/ai/ai_engine.h
===================================================================
--- branches/ai/src/ai/ai_engine.h	(revision 10348)
+++ branches/ai/src/ai/ai_engine.h	(revision 10349)
@@ -14,5 +14,5 @@
 
    void tick(float dt);
-	void addAI(int teamNumber, int swarmNumber, WorldEntity* npc);
+	void addAI(int teamNumber, int swarmNumber, WorldEntity* npc, float maxSpeed, float attackDistance);
 	void removeAI(int teamNumber, int swarmNumber, WorldEntity* npc);
 
Index: branches/ai/src/ai/ai_module.cc
===================================================================
--- branches/ai/src/ai/ai_module.cc	(revision 10348)
+++ branches/ai/src/ai/ai_module.cc	(revision 10349)
@@ -43,5 +43,6 @@
 	this->target = other->getTarget();
 	this->weight = other->getWeight();
-	this->speedMax = other->getMaxSpeed();
+	this->maxSpeed = other->getMaxSpeed();
+	this->attackDistance = other->getAttackDistance();
 	this->accelerationMax = other->getMaxAcceleration();
 }
Index: branches/ai/src/ai/ai_module.h
===================================================================
--- branches/ai/src/ai/ai_module.h	(revision 10348)
+++ branches/ai/src/ai/ai_module.h	(revision 10349)
@@ -16,4 +16,6 @@
 	inline void setTarget(WorldEntity* target){this->target=target;}
 	inline void setNPC(WorldEntity* npc){this->npc=npc;}
+	inline void setMaxSpeed(float maxSpeed){this->maxSpeed=maxSpeed;}
+	inline void setAttackDistance(float attackDistance){this->attackDistance=attackDistance;}
 
 	inline Vector getPosition(){return npc->getAbsCoor();}
@@ -24,5 +26,6 @@
 	inline float getWeight(){return weight;}
 	inline float getMaxAcceleration(){return accelerationMax;}
-	inline float getMaxSpeed(){return speedMax;}
+	inline float getMaxSpeed(){return maxSpeed;}
+	inline float getAttackDistance(){return attackDistance;}
 	inline float getNPCRadius(){return getRadius(npc);}
 
@@ -46,5 +49,6 @@
 
 	float weight;
-	float speedMax;
+	float maxSpeed;
+	float attackDistance;
 	float accelerationMax;
 };
Index: branches/ai/src/ai/ai_team.cc
===================================================================
--- branches/ai/src/ai/ai_team.cc	(revision 10348)
+++ branches/ai/src/ai/ai_team.cc	(revision 10349)
@@ -30,5 +30,5 @@
 
 		if(it->second->taskDone()){
-			std::cout << "Swarm Task Complete!\n";
+			//std::cout << "Swarm Task Complete!\n";
 
 			if(enemyList->size()==0){
@@ -51,26 +51,28 @@
 			//find new Position
 			if(isPlayer){
+				float attackDistance=it->second->getAttackDistance();
+
 				Vector targetPos=target->getAbsCoor();
 				int zNorm=(position.z>targetPos.z)?1:-1;
 
 				if((position.z-targetPos.z)*zNorm>60){	//go to start position
-					std::cout << "Go Start Position\n";
+					//std::cout << "Go Start Position\n";
 					changeSwarmModule(it, new SwarmGoRel);
 					zNorm=1-(rand()%2)*2;	//1 or -1
-					newPosition=Vector(190,0,zNorm*10);
+					newPosition=Vector(attackDistance+60,0,zNorm*10);
 					speed=60;
-				}else if(position.x > targetPos.x+160){	//go to attack position
-					std::cout << "Go Attack Position\n";
+				}else if(position.x > targetPos.x+attackDistance+40){	//go to attack position
+					//std::cout << "Go Attack Position\n";
 					changeSwarmModule(it, new SwarmGoRel);
-					newPosition=Vector(130,0,0);
+					newPosition=Vector(attackDistance+30,0,0);
 					speed=60;
-				}else if(position.x > targetPos.x+120){	//go to attack mode
-					std::cout << "Go Attack Mode\n";
+				}else if(position.x > targetPos.x+attackDistance+20){	//go to attack mode
+					//std::cout << "Go Attack Mode\n";
 					changeSwarmModule(it, new SwarmAttack);
-					newPosition=Vector(110,0,0);
+					newPosition=Vector(attackDistance,0,0);
 					speed=60;
 					maxTime=(rand()%11)+4;//4-14 Sekunden
 				}else{												//go to fallback point
-					std::cout << "Go  Fallback Point\n";
+					//std::cout << "Go  Fallback Point\n";
 					changeSwarmModule(it, new SwarmGoRel);
 					newPosition=Vector(80,0,zNorm*90);
@@ -106,5 +108,5 @@
 
 
-void AITeam::addAI(int swarmNumber, WorldEntity* npc)
+void AITeam::addAI(int swarmNumber, WorldEntity* npc, float maxSpeed, float attackDistance)
 {
 	std::pair<std::map<int,SwarmModule*>::iterator,bool> p;
@@ -112,5 +114,5 @@
 	p=swarms.insert(std::make_pair(swarmNumber,newSwarm));
 	if(!p.second)delete newSwarm;
-	p.first->second->addAI(npc);
+	p.first->second->addAI(npc, maxSpeed, attackDistance);
 }
 
Index: branches/ai/src/ai/ai_team.h
===================================================================
--- branches/ai/src/ai/ai_team.h	(revision 10348)
+++ branches/ai/src/ai/ai_team.h	(revision 10349)
@@ -11,5 +11,5 @@
 	std::vector<WorldEntity*>* getEnemyList();
 	void process(float dt);
-	void addAI(int swarmNumber, WorldEntity* npc);
+	void addAI(int swarmNumber, WorldEntity* npc, float maxSpeed, float attackDistance);
 	void removeAI(int swarmNumber, WorldEntity* npc);
 	inline int getTeamSize(){ return swarms.size(); }
Index: branches/ai/src/ai/attack_module.cc
===================================================================
--- branches/ai/src/ai/attack_module.cc	(revision 10348)
+++ branches/ai/src/ai/attack_module.cc	(revision 10349)
@@ -62,6 +62,4 @@
 
 	weight=1;
-	speedMax=1000.0f;
-
 
 	//get information about player
@@ -71,9 +69,10 @@
 	float playerRadius=getRadius( pl->getPlayable() );
 
-
 	//get information about myself
 	Vector myPosition = npc->getAbsCoor();
 	float myRadius = getRadius(npc);
-
+	//float vMax=1000.0f/myRadius;
+	float vMax=maxSpeed;
+	float aMax=1000/myRadius;
 
 	//anti player collision
@@ -117,5 +116,5 @@
 	Vector vectorToDestination=destination-myPosition;
 
-	Vector correction=		playerCollision*50*3
+	Vector correction=		playerCollision*50*3 *6/myRadius
 								+	npcCollision*50*3 *6/myRadius
 								+	destinationMovement*2//-movement
@@ -135,5 +134,5 @@
 	//limit speed
 	float movementLen=movement.len();
-	if(movementLen>speedMax)movement=movement/movementLen*speedMax;
+	if(movementLen>vMax)movement=movement/movementLen*vMax;
 
 
@@ -150,5 +149,5 @@
 	view = view.cross( Vector(0,1,0) ).getNormalized();
 
-	npc->setAbsDirSoft( Quaternion( view, Vector(0,1,0)),1);
+	npc->setAbsDirSoft( Quaternion( view, Vector(0,1,0)),8/myRadius);
 
 
Index: branches/ai/src/ai/movement_module.cc
===================================================================
--- branches/ai/src/ai/movement_module.cc	(revision 10348)
+++ branches/ai/src/ai/movement_module.cc	(revision 10349)
@@ -51,4 +51,8 @@
 }
 
+MovementModule::MovementModule(WorldEntity* object)
+{
+	this->npc=object;
+}
 
 void MovementModule::process(float dt)
@@ -79,6 +83,6 @@
 
 	float aMax=maxAccleration;
-	float vMax=800.0f/myRadius;
-
+	//float vMax=1000.0f/myRadius;
+	float vMax=maxSpeed;
 
 	//anti player collision
@@ -111,5 +115,5 @@
 	Vector vectorToDestination=destination-myPosition;
 
-	Vector correction=		playerCollision*50*3
+	Vector correction=		playerCollision*50*3 *6/myRadius
 								+	npcCollision*50*3 *6/myRadius
 								+	Vector(0,0,0)
@@ -137,5 +141,5 @@
 	//rotate NPC
 	view = movement.cross( Vector(0,1,0) ).getNormalized();
-	npc->setAbsDirSoft( Quaternion( view, Vector(0,1,0)),3);
+	npc->setAbsDirSoft( Quaternion( view, Vector(0,1,0)),10/myRadius);
 
 }
Index: branches/ai/src/ai/movement_module.h
===================================================================
--- branches/ai/src/ai/movement_module.h	(revision 10348)
+++ branches/ai/src/ai/movement_module.h	(revision 10349)
@@ -14,5 +14,5 @@
 	public:
 		MovementModule();
-		inline MovementModule(WorldEntity* object){this->npc=object;}
+		MovementModule(WorldEntity* object);
 		virtual ~MovementModule(){}
 		virtual void process(float dt);
Index: branches/ai/src/ai/swarm_gorel.cc
===================================================================
--- branches/ai/src/ai/swarm_gorel.cc	(revision 10348)
+++ branches/ai/src/ai/swarm_gorel.cc	(revision 10349)
@@ -29,5 +29,5 @@
 	averageRadius=averageRadius/members.size();
 	aMax=80;//400/averageRadius;
-	vMax=80;//300/averageRadius;
+	vMax=maxSpeed;//1000/averageRadius;//300/averageRadius;
 	viewChangeMax=90/averageRadius;
 
Index: branches/ai/src/ai/swarm_module.cc
===================================================================
--- branches/ai/src/ai/swarm_module.cc	(revision 10348)
+++ branches/ai/src/ai/swarm_module.cc	(revision 10349)
@@ -24,11 +24,15 @@
 
 
-void SwarmModule::addAI(WorldEntity* npc)
+void SwarmModule::addAI(WorldEntity* npc, float maxSpeed, float attackDistance)
 {
 	std::pair< std::map<WorldEntity*,AIModule*>::iterator , bool > p;
 	AIModule* newAIModule=new MovementModule(npc);
+	newAIModule->setAttackDistance(attackDistance);
+	newAIModule->setMaxSpeed(maxSpeed);
+	this->attackDistance=attackDistance;
+	this->maxSpeed=maxSpeed;
 	p=members.insert(std::make_pair(npc,newAIModule));
 	if(!p.second)delete newAIModule;
-	
+
 	this->initialize();
 }
@@ -40,5 +44,5 @@
 	delete it->second; 					//delete AIModule
 	members.erase(it); 					//remove AIModule from members
-	
+
 	this->initialize();
 }
@@ -77,5 +81,7 @@
 	this->enemys=other->getEnemyList();
 	this->position=other->getPosition();
-	
+	this->maxSpeed=other->getMaxSpeed();
+	this->attackDistance=other->getAttackDistance();
+
 	this->initialize();
 }
Index: branches/ai/src/ai/swarm_module.h
===================================================================
--- branches/ai/src/ai/swarm_module.h	(revision 10348)
+++ branches/ai/src/ai/swarm_module.h	(revision 10349)
@@ -10,13 +10,13 @@
 	virtual ~SwarmModule(){}
 	virtual void process(float dt){}
-	
-	void addAI(WorldEntity*);
+
+	void addAI(WorldEntity*, float maxSpeed, float attackDistance);
 	void removeAI(WorldEntity*);
 	void getAttributesFrom(SwarmModule* oldModule);
 	virtual void initialize(){}
 	inline bool taskDone(){return taskComplete;}
-	
-	inline void setEnemyList(std::vector<WorldEntity*>* enemys){this->enemys=enemys;}	
-	
+
+	inline void setEnemyList(std::vector<WorldEntity*>* enemys){this->enemys=enemys;}
+
 	inline void newOrder(){this->taskComplete=false;}
 	inline void orderRelPos(Vector taskRelPos){this->taskRelPos=taskRelPos;}
@@ -34,5 +34,7 @@
 	inline std::vector<WorldEntity*>* getEnemyList(){return enemys;}
 	inline std::map<WorldEntity*,AIModule*> getMembers(){return members;}
-	
+	inline float getMaxSpeed(){return maxSpeed;}
+	inline float getAttackDistance(){return attackDistance;}
+
  protected:
 	float getRadius(WorldEntity* object);
@@ -45,10 +47,13 @@
 	bool taskComplete;
 	float taskMaxTime;
-	
+
 	Vector view;
 	Vector position;
 	float speed;
-	
-	std::map<WorldEntity*,AIModule*> members;	
+
+	float maxSpeed;
+	float attackDistance;
+
+	std::map<WorldEntity*,AIModule*> members;
 	std::vector<WorldEntity*>* enemys;
 };
Index: branches/ai/src/world_entities/npcs/npc.cc
===================================================================
--- branches/ai/src/world_entities/npcs/npc.cc	(revision 10348)
+++ branches/ai/src/world_entities/npcs/npc.cc	(revision 10349)
@@ -55,5 +55,5 @@
   std::cout << "Swarm Number:" << swarmNumber << "\n";
 
-  AIEngine::getInstance()->addAI(teamNumber,swarmNumber,(WorldEntity*)this);
+  AIEngine::getInstance()->addAI(teamNumber,swarmNumber,(WorldEntity*)this,maxSpeed,attackDistance);
 
   this->bFire = false;
@@ -132,4 +132,12 @@
   LoadParam(root, "swarm", this, NPC, setSwarmNumber)
   .describe("this sets the swarm number")
+  .defaultValues(0);
+
+  LoadParam(root, "maxSpeed", this, NPC, setMaxSpeed)
+  .describe("this sets the NPC max Speed")
+  .defaultValues(0);
+
+  LoadParam(root, "attackDistance", this, NPC, setAttackDistance)
+  .describe("this sets the NPC distance to target")
   .defaultValues(0);
 }
Index: branches/ai/src/world_entities/npcs/npc.h
===================================================================
--- branches/ai/src/world_entities/npcs/npc.h	(revision 10348)
+++ branches/ai/src/world_entities/npcs/npc.h	(revision 10349)
@@ -36,5 +36,6 @@
   inline void setTeamNumber(int number) { teamNumber=number; }
   inline void setSwarmNumber(int number) { swarmNumber=number; }
-
+  inline void setMaxSpeed(float number) { maxSpeed=number; }
+  inline void setAttackDistance(float number) { attackDistance=number; }
 
  private:
@@ -43,4 +44,6 @@
   int                   swarmNumber;  //!< number of the swarm
   int                   difficulty;   //!< difficulty
+  float						maxSpeed;
+  float						attackDistance;
 
   WeaponManager         weaponMan;    //!< weapon manager
