Index: /branches/vs-enhencements/src/lib/math/vector.h
===================================================================
--- /branches/vs-enhencements/src/lib/math/vector.h	(revision 10659)
+++ /branches/vs-enhencements/src/lib/math/vector.h	(revision 10660)
@@ -51,5 +51,5 @@
 
   /** @param index The index of the "array" @returns the x/y/z coordinate */
-  inline float operator[] (float index) const {if( index == 0) return this->x; if( index == 1) return this->y; if( index == 2) return this->z; }
+  inline float operator[] (float index) const {if( index == 0) return this->x; if( index == 1) return this->y; if( index == 2) return this->z; else return this->x; }
   /** @param v The vector to add @returns the addition between two vectors (this + v) */
   inline Vector operator+ (const Vector& v) const { return Vector(x + v.x, y + v.y, z + v.z); };
Index: /branches/vs-enhencements/src/world_entities/space_ships/space_ship.cc
===================================================================
--- /branches/vs-enhencements/src/world_entities/space_ships/space_ship.cc	(revision 10659)
+++ /branches/vs-enhencements/src/world_entities/space_ships/space_ship.cc	(revision 10660)
@@ -188,4 +188,10 @@
   Weapon* wpLeft3 = new Disruptor ();
   wpLeft3->setName( "Disruptor");
+
+/*
+  Weapon* wpRight3 = Weapon::createWeapon( "Disruptor" );
+  wpRight3->setName( "Disruptor");
+  Weapon* wpLeft3 = Weapon::createWeapon( "Disruptor" );
+  wpLeft3->setName( "Disruptor");*/
 
   Weapon* cannon = new SwarmLauncher();
@@ -310,5 +316,5 @@
 
   this->weaponMan.setSlotCount(8);
-
+/*
   this->weaponMan.setSlotPosition(0, Vector(3.006, 1.028, .155));
   this->weaponMan.setSlotCapability(0, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
@@ -333,6 +339,17 @@
 
   this->weaponMan.setSlotPosition(7, Vector(1.431, -.612, -3.254));
-  this->weaponMan.setSlotDirection(7, Quaternion(+M_PI_4*.5-M_PI, Vector(1,0,0)));
-
+  this->weaponMan.setSlotDirection(7, Quaternion(+M_PI_4*.5-M_PI, Vector(1,0,0)));*/
+
+  this->createPriWMSlot(0, Vector(3.006, 1.028, .155), WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+  this->createPriWMSlot(1, Vector(3.006, 1.028, -.155), WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+  this->createPriWMSlot(2, Vector(4.03, .063, .876), WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+  this->createPriWMSlot(3, Vector(4.03, -.063, -.876), WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+  this->createPriWMSlot(4, Vector(1.431, -.612, 2.691), WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+  this->createPriWMSlot(5, Vector(1.431, -.612, -2.691), WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+  this->createPriWMSlot(6, Vector(1.431, -.612, 3.254), WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+  this->createPriWMSlot(7, Vector(1.431, -.612, -3.254), WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+
+  this->secWeaponMan.setSlotCount(6);
+/*
   this->secWeaponMan.setSlotPosition(0, Vector(1.5, 3, 0));
   this->secWeaponMan.setSlotCapability(0, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
@@ -351,5 +368,12 @@
 
   this->secWeaponMan.setSlotPosition(5, Vector(1.5, 0, -.5));
-  this->secWeaponMan.setSlotDirection(5, Quaternion(+M_PI_4*.5-M_PI, Vector(1,0,0)));
+  this->secWeaponMan.setSlotDirection(5, Quaternion(+M_PI_4*.5-M_PI, Vector(1,0,0)));*/
+
+  this->createSecWMSlot(0, Vector(1.5, 3, 0), WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+  this->createSecWMSlot(1, Vector(2.6, 0, 3.0), WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+  this->createSecWMSlot(2, Vector(1.5, 0, -.5), WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+  this->createSecWMSlot(3, Vector(1.5, 0, .5), WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+  this->createSecWMSlot(4, Vector(1.5, 0, .5), WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+  this->createSecWMSlot(5, Vector(1.5, 0, -.5), WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
 
 
Index: /branches/vs-enhencements/src/world_entities/space_ships/space_ship.h
===================================================================
--- /branches/vs-enhencements/src/world_entities/space_ships/space_ship.h	(revision 10659)
+++ /branches/vs-enhencements/src/world_entities/space_ships/space_ship.h	(revision 10660)
@@ -63,4 +63,5 @@
     inline WeaponManager& getWeaponManagerSecondary() { return this->secWeaponMan; };
 
+    //!< functions for XML loading
     inline void setReactor(float output) {this->reactorOutput = output; };
     inline void setShield(float cur, float max, float th, float regen)
@@ -81,4 +82,12 @@
     inline void updateHealth() { this->setHealth(this->armorCur); this->setHealthMax(this->armorMax); };
 
+    inline void setPriWM(int slot) { this->weaponMan.setSlotCount(slot); };
+    inline void setSecWM(int slot) { this->secWeaponMan.setSlotCount(slot); };
+    inline void createPriWMSlot( int slot, Vector location, long capability) {
+      this->weaponMan.setSlotPosition(slot, location);
+      this->weaponMan.setSlotCapability(slot, capability); };
+    inline void createSecWMSlot( int slot, Vector location, long capability) {
+      this->secWeaponMan.setSlotPosition(slot, location);
+      this->secWeaponMan.setSlotCapability(slot, capability); };
     //Functions for GUI
     inline float getShieldCur() { return this->shieldCur; };        //!< returns current shield value
