Index: branches/ai/src/world_entities/npcs/npc.cc
===================================================================
--- branches/ai/src/world_entities/npcs/npc.cc	(revision 10269)
+++ branches/ai/src/world_entities/npcs/npc.cc	(revision 10275)
@@ -24,6 +24,13 @@
 #include "ai_engine.h"
 
+#include "player.h"
+#include "playable.h"
+
+#include "weapons/test_gun.h"
+#include "weapons/turret.h"
+#include "weapons/cannon.h"
+
+#include "loading/factory.h"
 #include "debug.h"
-
 #include "loading/load_param.h"
 
@@ -32,4 +39,6 @@
 
 ObjectListDefinition(NPC);
+CREATE_FACTORY(NPC);
+
 
 NPC::NPC(const TiXmlElement* root)
@@ -38,13 +47,64 @@
   this->registerObject(this, NPC::_objectList);
 
-  this->toList(OM_GROUP_00);
+  this->toList(OM_GROUP_01);
+
+  if( root != NULL)
+	  this->loadParams(root);
 
   std::cout << "Team Number: " << teamNumber << "\n";
   std::cout << "Swarm Number:" << swarmNumber << "\n";
-  //aiModule=new MovementModule(this);
-  //AIEngine::getInstance()->addAI(teamNumber,swarmNumber,aiModule);
+
   AIEngine::getInstance()->addAI(teamNumber,swarmNumber,(WorldEntity*)this);
 
   this->bFire = false;
+
+
+    // create the weapons and their manager
+
+
+  this->getWeaponManager().changeWeaponConfig(1);
+  Weapon* wpRight = new TestGun(0);
+  wpRight->setName("testGun Right");
+  Weapon* wpLeft = new TestGun(1);
+  wpLeft->setName("testGun Left");
+
+  wpRight->toList( this->getOMListNumber());
+  wpLeft->toList( this->getOMListNumber());
+
+
+  this->addWeapon(wpLeft, 1, 0);
+  this->addWeapon(wpRight,1 ,1);
+
+  wpLeft->increaseEnergy( 100);
+  wpRight->increaseEnergy( 100);
+
+  this->setHealthMax(100);
+  this->setHealth(80);
+
+  this->getWeaponManager().setSlotCount(7);
+
+  this->getWeaponManager().setSlotPosition(0, Vector(-2.6, .1, -3.0));
+  this->getWeaponManager().setSlotCapability(0, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+
+  this->getWeaponManager().setSlotPosition(1, Vector(-2.6, .1, 3.0));
+  this->getWeaponManager().setSlotCapability(1, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+
+  this->getWeaponManager().setSlotPosition(2, Vector(-1.5, .5, -.5));
+  this->getWeaponManager().setSlotDirection(2, Quaternion(-M_PI_4*.5, Vector(1,0,0)));
+
+  this->getWeaponManager().setSlotPosition(3, Vector(-1.5, .5, .5));
+  this->getWeaponManager().setSlotDirection(3, Quaternion(M_PI_4*.5, Vector(1,0,0)));
+
+  this->getWeaponManager().setSlotPosition(4, Vector(-1.5, -.5, .5));
+  this->getWeaponManager().setSlotDirection(4, Quaternion(-M_PI_4*.5+M_PI, Vector(1,0,0)));
+
+  this->getWeaponManager().setSlotPosition(5, Vector(-1.5, -.5, -.5));
+  this->getWeaponManager().setSlotDirection(5, Quaternion(+M_PI_4*.5-M_PI, Vector(1,0,0)));
+
+  this->getWeaponManager().setSlotPosition(6, Vector(-1, 0.0, 0));
+  this->getWeaponManager().setSlotCapability(6, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+
+  this->getWeaponManager().getFixedTarget()->setParent(this);
+  this->getWeaponManager().getFixedTarget()->setRelCoor(100000,0,0);
 
 }
@@ -138,4 +198,5 @@
 void NPC::tick(float dt)
 {
+	//std::cout << "fire..\n";
   this->weaponMan.tick(dt);
   if (this->bFire)
Index: branches/ai/src/world_entities/npcs/npc.h
===================================================================
--- branches/ai/src/world_entities/npcs/npc.h	(revision 10269)
+++ branches/ai/src/world_entities/npcs/npc.h	(revision 10275)
@@ -17,5 +17,5 @@
   virtual ~NPC ();
 
-  virtual void loadParams(const TiXmlElement* root = NULL);
+  virtual void loadParams(const TiXmlElement* root);
 
 
@@ -29,6 +29,6 @@
   virtual void tick(float dt);
   inline int getTeam()  { return teamNumber; }
+  inline void fire(){ this->bFire=true;}
 
-  inline void fire() { this->bFire = true; }
 
 
Index: branches/ai/src/world_entities/npcs/npc_test.cc
===================================================================
--- branches/ai/src/world_entities/npcs/npc_test.cc	(revision 10269)
+++ branches/ai/src/world_entities/npcs/npc_test.cc	(revision 10275)
@@ -52,7 +52,6 @@
 
   // create the weapons and their manager
-  this->addWeapon(wpLeft, 1, 0);
-  this->addWeapon(wpRight,1 ,1);
-\
+
+
   this->getWeaponManager().changeWeaponConfig(1);
   Weapon* wpRight = new TestGun(0);
@@ -60,4 +59,7 @@
   Weapon* wpLeft = new TestGun(1);
   wpLeft->setName("testGun Left");
+
+  this->addWeapon(wpLeft, 1, 0);
+  this->addWeapon(wpRight,1 ,1);
 
   this->setHealthMax(100);
