Index: code/branches/ai2/src/orxonox/controllers/ArtificialController.cc
===================================================================
--- code/branches/ai2/src/orxonox/controllers/ArtificialController.cc	(revision 8741)
+++ code/branches/ai2/src/orxonox/controllers/ArtificialController.cc	(revision 8757)
@@ -33,4 +33,5 @@
 
 #include "util/Math.h"
+#include "util/Convert.h"
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
@@ -1047,5 +1048,5 @@
             float random = rnd(1);//
             if (this->isCloseAtTarget(130) && weapons[1] )
-            {//LENSFLARE: short range weapon     
+            {//LENSFLARE: short range weapon
                 this->getControllableEntity()->fire(1); //ai uses lens flare if they're close enough to the target
             }
@@ -1080,7 +1081,8 @@
             if(pawn)
             {
+                this->analyseWeapons(pawn);
                 for(unsigned int i=0; i < WeaponSystem::MAX_WEAPON_MODES; i++)
                 {
-                    const std::string wpn = getWeaponname(i, pawn); COUT(0)<<wpn<< std::endl;//Temporary debug info.
+                    //const std::string wpn = getWeaponname(i, 0, pawn); COUT(0)<<wpn<< std::endl;//Temporary debug info.
                     /*if(wpn=="") //future, more generic implementation; until now, only LaserMunition works. Is this a bug??
                         weapons[i]=false;
@@ -1110,21 +1112,54 @@
     }
 
-    const std::string& ArtificialController::getWeaponname(int i, Pawn* pawn)
+    const std::string ArtificialController::getWeaponname(int i, int u, Pawn* pawn)//Search through all wPacks,
     {//is there a way to minimize this long if-return structure, without triggering nullpointer exceptions?
-        if(!pawn) return "";
-        WeaponPack* wPack = pawn->getWeaponPack(i);
-        if(!wPack) return "";
+        if(!pawn) return "a";
+        WeaponPack* wPack = pawn->getWeaponPack(u);
+        if(!wPack) return "b";
         Weapon* wpn = wPack->getWeapon(i);
-        if(!wpn) return "";
-        WeaponMode* wMode = wpn->getWeaponmode(i);
-        if(!wMode) return "";
-        return wMode->getMunitionName();
+        if(!wpn && u<10 && i>0)
+        {
+            return this->getWeaponname(i, u+1, pawn);
+        }
+        else if(!wpn)
+            return "c";
+        //return wpn->getName();
+        WeaponMode* wMode = wpn->getWeaponmode(0);
+        if(!wMode) return "d";
+        return wMode->getMunitionName();//getName();
     }//pawn->getWeaponpack(i)->getWeapon(i)->getWeaponmode(i)->getMunitionName()
-
-    
+    /**
+        @brief Display how a spaceship is equiped with weapons. TODO: why are only 3 out of 8 weapons displayed??
+    */
+    void ArtificialController::analyseWeapons(Pawn* pawn)
+    {
+        int max=10, i=0, j=0, k=0;
+        if(!pawn) {COUT(0)<<"NO PAWN"<<std::endl; return;}
+        while(i<max)
+        {
+            WeaponPack* wPack = pawn->getWeaponPack(i); //WeaponSet* wSet = pawn->getWeaponSet(i);
+            i++;
+            if(wPack==NULL) continue;
+            while(j<max)
+            {
+                Weapon* wpn = wPack->getWeapon(j);
+                j++;
+                if(wpn==NULL) continue;
+                while(k<max)
+                {
+                    WeaponMode* wMode = wpn->getWeaponmode(k);
+                    k++;
+                    if(wMode==NULL) continue;
+                    COUT(0)<<wMode->getName()<<": weaponpack "+multi_cast<std::string>(i-1)<<", weapon "<<multi_cast<std::string>(j-1)<<", weaponmode "<<multi_cast<std::string>(k-1)<<std::endl;
+                }
+            }
+        }
+    }
+
+
     void ArtificialController::setBotLevel(float level)
     {
         if (level < 0.0f)
-            this->botlevel_ = 0.0f; 
+            this->botlevel_ = 0.0f;
         else if (level > 1.0f)
             this->botlevel_ = 1.0f;
@@ -1132,5 +1167,5 @@
             this->botlevel_ = level;
     }
-    
+
     void ArtificialController::setAllBotLevel(float level)
     {
@@ -1143,5 +1178,5 @@
         this->mode_ = DEFAULT; //Vector-implementation: mode_.pop_back();
     }
-    
+
     void ArtificialController::boostControl()
     {
Index: code/branches/ai2/src/orxonox/controllers/ArtificialController.h
===================================================================
--- code/branches/ai2/src/orxonox/controllers/ArtificialController.h	(revision 8741)
+++ code/branches/ai2/src/orxonox/controllers/ArtificialController.h	(revision 8757)
@@ -80,6 +80,6 @@
 
             virtual void doFire();
-	    void setBotLevel(float level=1.0f);
-	    inline float getBotLevel() const
+            void setBotLevel(float level=1.0f);
+            inline float getBotLevel() const
                 { return this->botlevel_; }
             static void setAllBotLevel(float level);
@@ -157,7 +157,8 @@
             enum Mode {DEFAULT, ROCKET, DEFENCE, MOVING};//TODO; implement DEFENCE, MOVING modes
             Mode mode_; //TODO: replace single value with stack-like implementation: std::vector<Mode> mode_;
-            void setPreviousMode(); 
+            void setPreviousMode();
             void setupWeapons(); //<! Defines which weapons are available for a bot. Is recalled whenever a bot was killed.
-            const std::string& getWeaponname(int i, Pawn* pawn); //<! Function that links a weapon's firemode to its name.
+            const std::string getWeaponname(int i, int u, Pawn* pawn); //<! Function that links a weapon's firemode to its name.
+            void analyseWeapons(Pawn* pawn);
             bool bSetupWorked; //<! If false, setupWeapons() is called.
     };
