Index: branches/presentation/src/world_entities/npcs/actionbox_enemy.cc
===================================================================
--- branches/presentation/src/world_entities/npcs/actionbox_enemy.cc	(revision 10699)
+++ branches/presentation/src/world_entities/npcs/actionbox_enemy.cc	(revision 10712)
@@ -24,4 +24,8 @@
 #include "playable.h"
 
+#include "particles/dot_emitter.h"
+#include "particles/emitter_node.h"
+#include "particles/sprite_particles.h"
+
 #include "actionbox_enemy.h"
 
@@ -30,4 +34,5 @@
 
 ActionboxEnemy::ActionboxEnemy(const TiXmlElement* root)
+  :weaponMan(this)
 {
   PRINTF(0)("ActionboxEnemy\n");
@@ -49,4 +54,47 @@
   if ( root )
     this->loadParams( root );
+  
+  
+    this->weaponMan.setParentEntity( this);
+  //weapons:
+
+  this->weaponMan.setParentEntity( this);
+
+  this->weaponMan.setSlotCount(8);
+
+  this->weaponMan.createWeaponSlot(0, 3.270, 1.028, .155, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+  this->weaponMan.createWeaponSlot(1, 3.270, 1.028, -.155, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+  this->weaponMan.createWeaponSlot(2, 4.385, .063, .876, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+  this->weaponMan.createWeaponSlot(3, 4.385, -.063, -.876, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+  this->weaponMan.createWeaponSlot(4, 1.635, -.612, 2.691, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+  this->weaponMan.createWeaponSlot(5, 1.536, -.612, -2.691, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+  this->weaponMan.createWeaponSlot(6, 1.536, -.612, 3.254, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+  this->weaponMan.createWeaponSlot(7, 1.536, -.612, -3.254, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+
+
+  this->weaponMan.addWeaponToSlot(0, 0, "RFCannon");
+  this->weaponMan.addWeaponToSlot(0, 1, "RFCannon");
+  this->weaponMan.addWeaponToSlot(0, 2, "RFCannon");
+  this->weaponMan.addWeaponToSlot(0, 3, "RFCannon");
+  this->weaponMan.addWeaponToSlot(1, 0, "RFCannon");
+  this->weaponMan.addWeaponToSlot(1, 1, "RFCannon");
+  this->weaponMan.addWeaponToSlot(1, 2, "RFCannon");
+  this->weaponMan.addWeaponToSlot(1, 3, "RFCannon");
+
+  this->weaponMan.addWeaponToSlot(0, 4, "NadionLaser");
+  this->weaponMan.addWeaponToSlot(0, 5, "NadionLaser");
+  this->weaponMan.addWeaponToSlot(2, 4, "NadionLaser");
+  this->weaponMan.addWeaponToSlot(2, 5, "NadionLaser");
+
+  this->weaponMan.addWeaponToSlot(0, 6, "Disruptor");
+  this->weaponMan.addWeaponToSlot(0, 7, "Disruptor");
+  this->weaponMan.addWeaponToSlot(3, 6, "Disruptor");
+  this->weaponMan.addWeaponToSlot(3, 7, "Disruptor");
+  
+  this->weaponMan.changeWeaponConfig(0);
+  
+  this->weaponMan.getFixedTarget()->setParent(this);
+  this->weaponMan.getFixedTarget()->setRelCoor(100000,0,0);
+  this->weaponMan.hideCrosshair();
 }
 
@@ -62,4 +110,5 @@
 void ActionboxEnemy::tick( float dt )
 {
+  weaponMan.tick( dt );
   this->bFire = false;
   
@@ -123,5 +172,5 @@
     {
       this->bFire = true;
-      PRINTF(0)("FIRE\n");
+      weaponMan.fire();
     }
   }
@@ -263,2 +312,34 @@
   WorldEntity::draw();
 }
+
+void ActionboxEnemy::destroy( WorldEntity * killer )
+{
+  EmitterNode* node  = NULL;
+  DotEmitter* emitter = NULL;
+  SpriteParticles*  explosionParticles  = NULL;
+
+  explosionParticles = new SpriteParticles(200);
+  explosionParticles->setName("SpaceShipExplosionParticles");
+  explosionParticles->setLifeSpan(.2, .3);
+  explosionParticles->setRadius(0.0, 10.0);
+  explosionParticles->setRadius(.5, 6.0);
+  explosionParticles->setRadius(1.0, 3.0);
+  explosionParticles->setColor(0.0, 1,1,1,.9);
+  explosionParticles->setColor(0.1,  1,1,0,.9);
+  explosionParticles->setColor(0.5, .8,.4,0,.5);
+  explosionParticles->setColor(1.0, .2,.2,.2,.5);
+
+
+  emitter = new DotEmitter( 2000, 70, 360);
+  emitter->setEmissionRate( 200.0);
+
+  node  = new EmitterNode( .1f);
+  node->setupParticle( emitter, explosionParticles);
+  node->setAbsDir( this->getAbsDir());
+  node->setVelocity( this->getVelocity() * .9f);
+  node->setAbsCoor( this->getAbsCoor());
+  if( !node->start())
+    PRINTF(0)("Explosion node not correctly started!");
+  
+  this->setAbsCoor( this->getAbsCoor() + Vector(100,0,0) + Vector(1,0,0) * VECTOR_RAND(150).dot(Vector(1,0,0)));
+}
