Index: orxonox/trunk/config.h.in
===================================================================
--- orxonox/trunk/config.h.in	(revision 4825)
+++ orxonox/trunk/config.h.in	(revision 4826)
@@ -40,4 +40,7 @@
 /* Define to 1 if you have the <memory.h> header file. */
 #undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <ogg/ogg.h> header file. */
+#undef HAVE_OGG_OGG_H
 
 /* Define to 1 if you have the <OpenGL/glu.h> header file. */
@@ -92,4 +95,7 @@
 #undef HAVE_UNISTD_H
 
+/* Define to 1 if you have the <vorbis/vorbisfile.h> header file. */
+#undef HAVE_VORBIS_VORBISFILE_H
+
 /* Define to 1 if the system has the type `_Bool'. */
 #undef HAVE__BOOL
Index: orxonox/trunk/configure
===================================================================
--- orxonox/trunk/configure	(revision 4825)
+++ orxonox/trunk/configure	(revision 4826)
@@ -1602,5 +1602,5 @@
 fi
 
-if mkdir -p -- . 2>/dev/null; then
+if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
   # Keeping the `.' argument allows $(mkdir_p) to be used without
   # argument.  Indeed, we sometimes output rules like
@@ -1615,5 +1615,5 @@
   # directories to create, and then abort because `.' already
   # exists.
-  for d in ./-p ./--;
+  for d in ./-p ./--version;
   do
     test -d $d && rmdir $d
@@ -2521,5 +2521,7 @@
     for i in 1 2 3 4 5 6; do
       echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      : > sub/conftst$i.h
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
@@ -2549,7 +2551,12 @@
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
-      # (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored.
-      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
         am_cv_CXX_dependencies_compiler_type=$depmode
         break
@@ -3432,5 +3439,7 @@
     for i in 1 2 3 4 5 6; do
       echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      : > sub/conftst$i.h
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
@@ -3460,7 +3469,12 @@
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
-      # (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored.
-      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
         am_cv_CC_dependencies_compiler_type=$depmode
         break
@@ -10836,12 +10850,12 @@
   # Extract the definition of DEP_FILES from the Makefile without
   # running `make'.
-  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
   test -z "$DEPDIR" && continue
   # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n -e '/^U = / s///p' < "$mf"`
+  U=`sed -n 's/^U = //p' < "$mf"`
   test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
   # We invoke sed twice because it is the simplest approach to
   # changing $(DEPDIR) to its actual value in the expansion.
-  for file in `sed -n -e '
+  for file in `sed -n '
     /^DEP_FILES = .*\\\\$/ {
       s/^DEP_FILES = //
Index: orxonox/trunk/src/Makefile.am
===================================================================
--- orxonox/trunk/src/Makefile.am	(revision 4825)
+++ orxonox/trunk/src/Makefile.am	(revision 4826)
@@ -57,4 +57,5 @@
                   world_entities/character_attributes.cc \
                   world_entities/test_entity.cc \
+                  world_entities/weapons/weapon_manager.cc \
                   world_entities/weapons/weapon.cc \
                   world_entities/weapons/projectile.cc \
@@ -109,4 +110,5 @@
                  world_entities/character_attributes.h \
                  world_entities/test_entity.h \
+                 world_entities/weapons/weapon_manager.h \
                  world_entities/weapons/weapon.h \
                  world_entities/weapons/projectile.h \
Index: orxonox/trunk/src/Makefile.in
===================================================================
--- orxonox/trunk/src/Makefile.in	(revision 4825)
+++ orxonox/trunk/src/Makefile.in	(revision 4826)
@@ -69,8 +69,9 @@
 	orxonox-satellite.$(OBJEXT) \
 	orxonox-character_attributes.$(OBJEXT) \
-	orxonox-test_entity.$(OBJEXT) orxonox-weapon.$(OBJEXT) \
-	orxonox-projectile.$(OBJEXT) orxonox-test_gun.$(OBJEXT) \
-	orxonox-test_bullet.$(OBJEXT) orxonox-crosshair.$(OBJEXT) \
-	orxonox-p_node.$(OBJEXT) orxonox-null_parent.$(OBJEXT) \
+	orxonox-test_entity.$(OBJEXT) orxonox-weapon_manager.$(OBJEXT) \
+	orxonox-weapon.$(OBJEXT) orxonox-projectile.$(OBJEXT) \
+	orxonox-test_gun.$(OBJEXT) orxonox-test_bullet.$(OBJEXT) \
+	orxonox-crosshair.$(OBJEXT) orxonox-p_node.$(OBJEXT) \
+	orxonox-null_parent.$(OBJEXT) \
 	orxonox-graphics_engine.$(OBJEXT) orxonox-light.$(OBJEXT) \
 	orxonox-text_engine.$(OBJEXT) orxonox-base_object.$(OBJEXT) \
@@ -127,4 +128,5 @@
 @AMDEP_TRUE@	./$(DEPDIR)/orxonox-vector.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/orxonox-weapon.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/orxonox-weapon_manager.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/orxonox-world.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/orxonox-world_entity.Po
@@ -303,4 +305,5 @@
                   world_entities/character_attributes.cc \
                   world_entities/test_entity.cc \
+                  world_entities/weapons/weapon_manager.cc \
                   world_entities/weapons/weapon.cc \
                   world_entities/weapons/projectile.cc \
@@ -355,4 +358,5 @@
                  world_entities/character_attributes.h \
                  world_entities/test_entity.h \
+                 world_entities/weapons/weapon_manager.h \
                  world_entities/weapons/weapon.h \
                  world_entities/weapons/projectile.h \
@@ -411,7 +415,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/Makefile
+	  $(AUTOMAKE) --foreign  src/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@@ -507,4 +511,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox-vector.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox-weapon.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox-weapon_manager.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox-world.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox-world_entity.Po@am__quote@
@@ -957,4 +962,20 @@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o orxonox-test_entity.obj `if test -f 'world_entities/test_entity.cc'; then $(CYGPATH_W) 'world_entities/test_entity.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/test_entity.cc'; fi`
+
+orxonox-weapon_manager.o: world_entities/weapons/weapon_manager.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT orxonox-weapon_manager.o -MD -MP -MF "$(DEPDIR)/orxonox-weapon_manager.Tpo" -c -o orxonox-weapon_manager.o `test -f 'world_entities/weapons/weapon_manager.cc' || echo '$(srcdir)/'`world_entities/weapons/weapon_manager.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/orxonox-weapon_manager.Tpo" "$(DEPDIR)/orxonox-weapon_manager.Po"; else rm -f "$(DEPDIR)/orxonox-weapon_manager.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='world_entities/weapons/weapon_manager.cc' object='orxonox-weapon_manager.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/orxonox-weapon_manager.Po' tmpdepfile='$(DEPDIR)/orxonox-weapon_manager.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o orxonox-weapon_manager.o `test -f 'world_entities/weapons/weapon_manager.cc' || echo '$(srcdir)/'`world_entities/weapons/weapon_manager.cc
+
+orxonox-weapon_manager.obj: world_entities/weapons/weapon_manager.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT orxonox-weapon_manager.obj -MD -MP -MF "$(DEPDIR)/orxonox-weapon_manager.Tpo" -c -o orxonox-weapon_manager.obj `if test -f 'world_entities/weapons/weapon_manager.cc'; then $(CYGPATH_W) 'world_entities/weapons/weapon_manager.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/weapons/weapon_manager.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/orxonox-weapon_manager.Tpo" "$(DEPDIR)/orxonox-weapon_manager.Po"; else rm -f "$(DEPDIR)/orxonox-weapon_manager.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='world_entities/weapons/weapon_manager.cc' object='orxonox-weapon_manager.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/orxonox-weapon_manager.Po' tmpdepfile='$(DEPDIR)/orxonox-weapon_manager.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o orxonox-weapon_manager.obj `if test -f 'world_entities/weapons/weapon_manager.cc'; then $(CYGPATH_W) 'world_entities/weapons/weapon_manager.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/weapons/weapon_manager.cc'; fi`
 
 orxonox-weapon.o: world_entities/weapons/weapon.cc
Index: orxonox/trunk/src/lib/Makefile.in
===================================================================
--- orxonox/trunk/src/lib/Makefile.in	(revision 4825)
+++ orxonox/trunk/src/lib/Makefile.in	(revision 4826)
@@ -189,7 +189,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/lib/Makefile
+	  $(AUTOMAKE) --foreign  src/lib/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: orxonox/trunk/src/lib/collision_detection/Makefile.in
===================================================================
--- orxonox/trunk/src/lib/collision_detection/Makefile.in	(revision 4825)
+++ orxonox/trunk/src/lib/collision_detection/Makefile.in	(revision 4826)
@@ -224,7 +224,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/collision_detection/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/collision_detection/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/lib/collision_detection/Makefile
+	  $(AUTOMAKE) --foreign  src/lib/collision_detection/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: orxonox/trunk/src/lib/event/Makefile.in
===================================================================
--- orxonox/trunk/src/lib/event/Makefile.in	(revision 4825)
+++ orxonox/trunk/src/lib/event/Makefile.in	(revision 4826)
@@ -212,7 +212,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/event/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/event/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/lib/event/Makefile
+	  $(AUTOMAKE) --foreign  src/lib/event/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: orxonox/trunk/src/lib/graphics/Makefile.in
===================================================================
--- orxonox/trunk/src/lib/graphics/Makefile.in	(revision 4825)
+++ orxonox/trunk/src/lib/graphics/Makefile.in	(revision 4826)
@@ -179,7 +179,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/graphics/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/graphics/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/lib/graphics/Makefile
+	  $(AUTOMAKE) --foreign  src/lib/graphics/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: orxonox/trunk/src/lib/graphics/importer/Makefile.in
===================================================================
--- orxonox/trunk/src/lib/graphics/importer/Makefile.in	(revision 4825)
+++ orxonox/trunk/src/lib/graphics/importer/Makefile.in	(revision 4826)
@@ -218,7 +218,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/graphics/importer/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/graphics/importer/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/lib/graphics/importer/Makefile
+	  $(AUTOMAKE) --foreign  src/lib/graphics/importer/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: orxonox/trunk/src/lib/graphics/spatial_separation/Makefile.in
===================================================================
--- orxonox/trunk/src/lib/graphics/spatial_separation/Makefile.in	(revision 4825)
+++ orxonox/trunk/src/lib/graphics/spatial_separation/Makefile.in	(revision 4826)
@@ -205,7 +205,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/graphics/spatial_separation/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/graphics/spatial_separation/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/lib/graphics/spatial_separation/Makefile
+	  $(AUTOMAKE) --foreign  src/lib/graphics/spatial_separation/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: orxonox/trunk/src/lib/gui/Makefile.in
===================================================================
--- orxonox/trunk/src/lib/gui/Makefile.in	(revision 4825)
+++ orxonox/trunk/src/lib/gui/Makefile.in	(revision 4826)
@@ -241,7 +241,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/gui/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/gui/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/lib/gui/Makefile
+	  $(AUTOMAKE) --foreign  src/lib/gui/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: orxonox/trunk/src/lib/particles/Makefile.in
===================================================================
--- orxonox/trunk/src/lib/particles/Makefile.in	(revision 4825)
+++ orxonox/trunk/src/lib/particles/Makefile.in	(revision 4826)
@@ -209,7 +209,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/particles/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/particles/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/lib/particles/Makefile
+	  $(AUTOMAKE) --foreign  src/lib/particles/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: orxonox/trunk/src/lib/physics/Makefile.in
===================================================================
--- orxonox/trunk/src/lib/physics/Makefile.in	(revision 4825)
+++ orxonox/trunk/src/lib/physics/Makefile.in	(revision 4826)
@@ -218,7 +218,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/physics/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/physics/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/lib/physics/Makefile
+	  $(AUTOMAKE) --foreign  src/lib/physics/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: orxonox/trunk/src/lib/sound/Makefile.in
===================================================================
--- orxonox/trunk/src/lib/sound/Makefile.in	(revision 4825)
+++ orxonox/trunk/src/lib/sound/Makefile.in	(revision 4826)
@@ -201,7 +201,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/sound/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/sound/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/lib/sound/Makefile
+	  $(AUTOMAKE) --foreign  src/lib/sound/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: orxonox/trunk/src/lib/tinyxml/Makefile.in
===================================================================
--- orxonox/trunk/src/lib/tinyxml/Makefile.in	(revision 4825)
+++ orxonox/trunk/src/lib/tinyxml/Makefile.in	(revision 4826)
@@ -204,7 +204,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/tinyxml/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/tinyxml/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/lib/tinyxml/Makefile
+	  $(AUTOMAKE) --foreign  src/lib/tinyxml/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: orxonox/trunk/src/story_entities/world.cc
===================================================================
--- orxonox/trunk/src/story_entities/world.cc	(revision 4825)
+++ orxonox/trunk/src/story_entities/world.cc	(revision 4826)
@@ -880,5 +880,4 @@
     }
   delete iterator;
-  crosshair->draw();
 
   glCallList (objectList);
@@ -888,4 +887,5 @@
   TextEngine::getInstance()->draw();
   LightManager::getInstance()->draw(); // must be at the end of the drawing procedure, otherwise Light cannot be handled as PNodes //
+  crosshair->draw();
 }
 
Index: orxonox/trunk/src/subprojects/Makefile.in
===================================================================
--- orxonox/trunk/src/subprojects/Makefile.in	(revision 4825)
+++ orxonox/trunk/src/subprojects/Makefile.in	(revision 4826)
@@ -187,7 +187,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/subprojects/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/subprojects/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/subprojects/Makefile
+	  $(AUTOMAKE) --foreign  src/subprojects/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: orxonox/trunk/src/subprojects/collision_detection/Makefile.in
===================================================================
--- orxonox/trunk/src/subprojects/collision_detection/Makefile.in	(revision 4825)
+++ orxonox/trunk/src/subprojects/collision_detection/Makefile.in	(revision 4826)
@@ -270,7 +270,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/subprojects/collision_detection/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/subprojects/collision_detection/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/subprojects/collision_detection/Makefile
+	  $(AUTOMAKE) --foreign  src/subprojects/collision_detection/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: orxonox/trunk/src/subprojects/gui/Makefile.in
===================================================================
--- orxonox/trunk/src/subprojects/gui/Makefile.in	(revision 4825)
+++ orxonox/trunk/src/subprojects/gui/Makefile.in	(revision 4826)
@@ -225,7 +225,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/subprojects/gui/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/subprojects/gui/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/subprojects/gui/Makefile
+	  $(AUTOMAKE) --foreign  src/subprojects/gui/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: orxonox/trunk/src/subprojects/importer/Makefile.in
===================================================================
--- orxonox/trunk/src/subprojects/importer/Makefile.in	(revision 4825)
+++ orxonox/trunk/src/subprojects/importer/Makefile.in	(revision 4826)
@@ -243,7 +243,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/subprojects/importer/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/subprojects/importer/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/subprojects/importer/Makefile
+	  $(AUTOMAKE) --foreign  src/subprojects/importer/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: orxonox/trunk/src/subprojects/particles/Makefile.in
===================================================================
--- orxonox/trunk/src/subprojects/particles/Makefile.in	(revision 4825)
+++ orxonox/trunk/src/subprojects/particles/Makefile.in	(revision 4826)
@@ -259,7 +259,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/subprojects/particles/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/subprojects/particles/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/subprojects/particles/Makefile
+	  $(AUTOMAKE) --foreign  src/subprojects/particles/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: orxonox/trunk/src/subprojects/testmain/Makefile.in
===================================================================
--- orxonox/trunk/src/subprojects/testmain/Makefile.in	(revision 4825)
+++ orxonox/trunk/src/subprojects/testmain/Makefile.in	(revision 4826)
@@ -196,7 +196,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/subprojects/testmain/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/subprojects/testmain/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/subprojects/testmain/Makefile
+	  $(AUTOMAKE) --foreign  src/subprojects/testmain/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: orxonox/trunk/src/world_entities/player.cc
===================================================================
--- orxonox/trunk/src/world_entities/player.cc	(revision 4825)
+++ orxonox/trunk/src/world_entities/player.cc	(revision 4826)
@@ -21,4 +21,6 @@
 #include "objModel.h"
 #include "resource_manager.h"
+
+#include "weapon_manager.h"
 #include "weapon.h"
 #include "test_gun.h"
Index: orxonox/trunk/src/world_entities/weapons/crosshair.cc
===================================================================
--- orxonox/trunk/src/world_entities/weapons/crosshair.cc	(revision 4825)
+++ orxonox/trunk/src/world_entities/weapons/crosshair.cc	(revision 4826)
@@ -23,4 +23,6 @@
 #include "p_node.h"
 #include "state.h"
+
+#include <iostream>
 
 using namespace std;
@@ -113,22 +115,26 @@
   */
 
+
   GraphicsEngine::storeMatrices();
 
-  GLfloat z;
-  glReadPixels ((int)position2D[0], GraphicsEngine::getInstance()->getResolutionY()-(int)position2D[1], 1, 1, GL_DEPTH_COMPONENT, GL_DOUBLE, &z);
+  float z;
+  glReadPixels ((int)position2D[0], GraphicsEngine::getInstance()->getResolutionY()-(int)position2D[1]-1, 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &z);
 
-  printf("%p:: %d %d %f\n",this, (int)position2D[0], (int)position2D[1], z);
+
+  printf("%f %f %f\n", (int)position2D[0], (int)position2D[1], z);
+
+  //cout << z <<"  "<< scale << "  "  << bias<< endl;
 
   GLdouble objX, objY, objZ;
-  if (gluUnProject(position2D[0],
-      GraphicsEngine::getInstance()->getResolutionY()-position2D[1],
-      z,
-      GraphicsEngine::modMat,
-      GraphicsEngine::projMat,
-      GraphicsEngine::viewPort,
-      &objX,
-      &objY,
-      &objZ ));
-  /*
+  gluUnProject(position2D[0],
+               GraphicsEngine::getInstance()->getResolutionY()-position2D[1]-1,
+               .5,
+               GraphicsEngine::modMat,
+               GraphicsEngine::projMat,
+               GraphicsEngine::viewPort,
+               &objX,
+               &objY,
+               &objZ );
+
   glBegin(GL_TRIANGLES);
   glColor3f(1,0,0);
@@ -137,4 +143,3 @@
   glVertex3f(objX, objY, objZ+1);
   glEnd();
-  */
 }
Index: orxonox/trunk/src/world_entities/weapons/weapon.cc
===================================================================
--- orxonox/trunk/src/world_entities/weapons/weapon.cc	(revision 4825)
+++ orxonox/trunk/src/world_entities/weapons/weapon.cc	(revision 4826)
@@ -1,3 +1,2 @@
-
 
 /*
@@ -11,11 +10,10 @@
    any later version.
 
-   ### File Specific
+### File Specific
    main-programmer: Patrick Boenzli
    co-programmer:
 */
 
-#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WEAPON
-
+#include "weapon_manager.h"
 #include "weapon.h"
 #include "stdincl.h"
@@ -27,188 +25,4 @@
 #include "world.h"
 
-using namespace std;
-
-
-
-/**
-   \brief this initializes the weaponManager for a given nnumber of weapon slots
-   \param number of weapon slots of the model/ship <= 8 (limitied)
-*/
-WeaponManager::WeaponManager(int nrOfSlots)
-{
-  this->setClassID(CL_WEAPON_MANAGER, "WeaponManager");
-
-  for(int i = 0; i < W_MAX_CONFIGS; ++i)
-    {
-      this->configs[i].bUsed = false;
-      for(int j = 0; j < W_MAX_SLOTS; ++j)
-        this->configs[i].slots[j] = NULL;
-    }
-  this->nrOfSlots = nrOfSlots;
-  this->currConfID = W_CONFIG0;
-}
-
-
-WeaponManager::~WeaponManager()
-{
-  /*
-     i dont have to delete the weapons itself, because they are
-     worldentities and therefore in the entities list of the world.
-     world will clean them up for me
-  */
-  for(int i = 0; i < W_MAX_CONFIGS; ++i)
-    {
-      this->configs[i].bUsed = false;
-      for(int j = 0; j < W_MAX_SLOTS; ++j)
-        this->configs[i].slots[j] = NULL;
-    }
-}
-
-
-/**
-   \brief adds a weapon to the selected weaponconfiguration into the selected slot
-   \param the weapon to add
-   \param an identifier for the slot: number between 0..7 if not specified: slotID=next free slot
-   \param an identifier for the weapon configuration, number between 0..3
-
-   if you add explicitly a weapon at config:n, slot:m, the weapon placed at this location will be
-   replaced by the weapon specified. if you use the W_FREE_SLOT, the manager will look for a free
-   slot in this weaponconfiguration. if there is non, the weapon won't be added and there will be
-   a error message.
-*/
-void WeaponManager::addWeapon(Weapon* weapon, int configID, int slotID)
-{
-  if( slotID == W_FREE_SLOT)
-    {
-      int freeSlot = this->getNextFreeSlot( configID);
-      if( freeSlot < 0 || freeSlot >= this->nrOfSlots)
-        {
-          PRINTF(0)("There is no free slot in this WeaponConfig to dock this weapon at! Aborting\n");
-          return;
-        }
-      PRINTF(3)("Added new Weapon to Config:%i/Slot:%i\n", configID, freeSlot);
-      this->configs[configID].bUsed = true;
-      this->configs[configID].slots[freeSlot] = weapon;
-      return;
-    }
-  this->configs[configID].bUsed = true;
-  this->configs[configID].slots[slotID] = weapon;
-  PRINTF(3)("Added a new Weapon to the WeaponManager: config %i/ slot %i\n", configID, slotID);
-}
-
-
-void WeaponManager::removeWeapon(Weapon* weapon, int configID)
-{
-  /* empty */
-}
-
-
-/**
-   \brief changes to the next weapon configuration
-
-   if there are multiple weapon configurations defined by the manager, use this to switch between them
-   this function will deactivate the weapons first, change the config and reactivate them later
-*/
-void WeaponManager::nextWeaponConf()
-{
-  PRINTF(4)("Changing weapon configuration: from %i to next\n", this->currConfID);
-
-  int i, lastConfID;
-  lastConfID = this->currConfID;
-  for(i = this->currConfID + 1; i < W_MAX_CONFIGS && !this->configs[i].bUsed; ++i);
-  if( i == W_MAX_CONFIGS) this->currConfID = W_CONFIG0;
-  else this->currConfID = i;
-
-
-  Weapon *w1, *w2;
-  for(int j = 0; j < W_MAX_SLOTS; ++j)
-    {
-      w1 = this->configs[lastConfID].slots[j];
-      w2 = this->configs[this->currConfID].slots[j];
-
-      if( w1 == w2)
-        {
-          printf("no need for change\n");
-        }
-      else
-        {
-        if( w1 != NULL )
-          {
-            w1->deactivate();
-            printf("deactivating %i,%i\n", j,lastConfID);
-          }
-        if( w2 != NULL)
-          {
-            w2->activate();
-            printf("activating %i,%i\n", j, this->currConfID);
-          }
-        }
-    }
-}
-
-
-
-/**
-   \brief triggers fire of all weapons in the current weaponconfig
-*/
-void WeaponManager::fire()
-{
-  Weapon* firingWeapon;
-  for(int i = 0; i < W_MAX_SLOTS; ++i)
-    {
-      firingWeapon = this->configs[this->currConfID].slots[i];
-      if( firingWeapon != NULL) firingWeapon->fire();
-    }
-}
-
-
-/**
-   \brief triggers tick of all weapons in the current weaponconfig
-   \param second passed since last tick
-*/
-void WeaponManager::tick(float sec)
-{
-  Weapon* w;
-  for(int i = 0; i < W_MAX_SLOTS; ++i)
-    {
-      w = this->configs[this->currConfID].slots[i];
-      if( w != NULL) w->tick(sec);
-    }
-}
-
-
-/**
-   \brief triggers draw of all weapons in the current weaponconfig
-*/
-void WeaponManager::draw()
-{
-  Weapon* w;
-  for(int i = 0; i < W_MAX_SLOTS; ++i)
-    {
-      w = this->configs[this->currConfID].slots[i];
-      if( w != NULL) w->draw();
-    }
-}
-
-
-/**
-   \brief private gets the next free slot in a certain weaponconfig
-   \param the selected weaponconfig
-*/
-int WeaponManager::getNextFreeSlot(int configID)
-{
-  for( int i = 0; i < W_MAX_SLOTS; ++i)
-    {
-      if( this->configs[configID].slots[i] == NULL)
-        return i;
-    }
-  return -1;
-}
-
-
-
-
-
-
 /**
    \brief standard constructor
Index: orxonox/trunk/src/world_entities/weapons/weapon.h
===================================================================
--- orxonox/trunk/src/world_entities/weapons/weapon.h	(revision 4825)
+++ orxonox/trunk/src/world_entities/weapons/weapon.h	(revision 4826)
@@ -3,8 +3,4 @@
     \brief a weapon that a player can use
 
-    A Player has a list of weapons, that can be choosen to shoot projectiles
-    (projectiles.{cc,h}) at ennemies. These weapons can be shooted sequentially
-    or (if able) combined. Therefore you can choose the weapon mode = choose
-    a weapon.
 
     A weapon is characterized by:
@@ -17,12 +13,4 @@
      o sound file/ressource: this is a pointer to the sound-file/ressource. however it may be represented
      o shooting animation
-
-
-     a player defines one or more weapon configurations. a player has got one to eight
-     weapon slots: places where weapons can be attached to. a weapon configuration
-     is a matching between weapons and slots.
-     Since its clear how many weapons a player will have, there is no list of weapons:
-     its hard coded and limited to 8 slots and 4 configs. More would be a waste of
-     memory and time you need to customize and change to a weapon config...
 */
 
@@ -44,31 +32,23 @@
 class TiXmlElement;
 
+
+// typedef enum {
+//   W_SHOOT,
+//   W_EMPTY,
+//   W_RELOAD,
+//   W_SPECIAL1,
+//   W_SPECIAL2,
+//   W_SPECIAL3
+// } WeaponSoundType;
+
 typedef enum {
+  W_NONE,
   W_SHOOT,
-  W_EMPTY,
   W_RELOAD,
-  W_SPECIAL1,
-  W_SPECIAL2,
-  W_SPECIAL3
-} WeaponSoundType;
+  W_ACTIVATING,
+  W_DEACTIVATE,
+  W_IDLE,
+} WeaponState;
 
-
-//! this is an identifier for the slot. there are up to 8 weapon slots -> this means there can't be more than 8 weapons at the same time
-#define    W_SLOT0       0
-#define    W_SLOT1       1
-#define    W_SLOT2       2
-#define    W_SLOT3       3
-#define    W_SLOT4       4
-#define    W_SLOT5       5
-#define    W_SLOT6       6
-#define    W_SLOT7       7
-#define    W_FREE_SLOT   99
-
-
-//! this is an identifier for the weapon config
-#define    W_CONFIG0     0
-#define    W_CONFIG1     1
-#define    W_CONFIG2     2
-#define    W_CONFIG3     3
 
 //! a weapon can be left or right sided
@@ -76,35 +56,7 @@
 #define    W_RIGHT       1
 
-//! this is a weapon Configuration: it has up to 8 slots
-typedef struct weaponConfig {
-  bool           bUsed;                       //<! is set to true, if this configuration is
-  Weapon*        slots[8];
-};
 
 
-class WeaponManager : public BaseObject {
- public:
-  WeaponManager(int nrOfSlots = 2);
-  WeaponManager(const TiXmlElement* root);
-  ~WeaponManager();
 
-  void init();
-  void loadParams(const TiXmlElement* root);
-
-  void addWeapon(Weapon* weapon, int configID = W_CONFIG0, int slotID = W_FREE_SLOT);
-  void removeWeapon(Weapon* weapon, int configID = W_CONFIG0);
-  void nextWeaponConf();
-
-  void fire();
-  void tick(float sec);
-  void draw();
-
- private:
-  int                   nrOfSlots;               //<! number of weapon slots a ship has
-  int                   currConfID;              //<! the currently selected config
-  weaponConfig          configs[4];              //<! a list of four configurations
-
-  int getNextFreeSlot(int configID);
-};
 
 class Weapon : public WorldEntity
Index: orxonox/trunk/src/world_entities/weapons/weapon_manager.cc
===================================================================
--- orxonox/trunk/src/world_entities/weapons/weapon_manager.cc	(revision 4826)
+++ orxonox/trunk/src/world_entities/weapons/weapon_manager.cc	(revision 4826)
@@ -0,0 +1,207 @@
+
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+### File Specific
+   main-programmer: Patrick Boenzli
+   co-programmer:
+*/
+
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WEAPON
+
+#include "weapon_manager.h"
+#include "weapon.h"
+#include "stdincl.h"
+#include "world_entity.h"
+#include "vector.h"
+#include "model.h"
+#include "projectile.h"
+#include "list.h"
+#include "world.h"
+
+using namespace std;
+
+
+
+/**
+ * @brief this initializes the weaponManager for a given nnumber of weapon slots
+ * @param number of weapon slots of the model/ship <= 8 (limitied)
+ */
+              WeaponManager::WeaponManager(int nrOfSlots)
+{
+  this->setClassID(CL_WEAPON_MANAGER, "WeaponManager");
+
+  for(int i = 0; i < W_MAX_CONFIGS; ++i)
+  {
+    this->configs[i].bUsed = false;
+    for(int j = 0; j < W_MAX_SLOTS; ++j)
+      this->configs[i].slots[j] = NULL;
+  }
+  this->nrOfSlots = nrOfSlots;
+  this->currConfID = W_CONFIG0;
+}
+
+
+WeaponManager::~WeaponManager()
+{
+  /*
+  i dont have to delete the weapons itself, because they are
+  worldentities and therefore in the entities list of the world.
+  world will clean them up for me
+  */
+  for(int i = 0; i < W_MAX_CONFIGS; ++i)
+  {
+    this->configs[i].bUsed = false;
+    for(int j = 0; j < W_MAX_SLOTS; ++j)
+      this->configs[i].slots[j] = NULL;
+  }
+}
+
+
+/**
+ * @brief adds a weapon to the selected weaponconfiguration into the selected slot
+ * @param the weapon to add
+ * @param an identifier for the slot: number between 0..7 if not specified: slotID=next free slot
+ * @param an identifier for the weapon configuration, number between 0..3
+
+ if you add explicitly a weapon at config:n, slot:m, the weapon placed at this location will be
+              replaced by the weapon specified. if you use the W_FREE_SLOT, the manager will look for a free
+              slot in this weaponconfiguration. if there is non, the weapon won't be added and there will be
+              a error message.
+ */
+              void WeaponManager::addWeapon(Weapon* weapon, int configID, int slotID)
+{
+  if( slotID == W_FREE_SLOT)
+  {
+    int freeSlot = this->getNextFreeSlot( configID);
+    if( freeSlot < 0 || freeSlot >= this->nrOfSlots)
+    {
+      PRINTF(0)("There is no free slot in this WeaponConfig to dock this weapon at! Aborting\n");
+      return;
+    }
+    PRINTF(3)("Added new Weapon to Config:%i/Slot:%i\n", configID, freeSlot);
+    this->configs[configID].bUsed = true;
+    this->configs[configID].slots[freeSlot] = weapon;
+    return;
+  }
+  this->configs[configID].bUsed = true;
+  this->configs[configID].slots[slotID] = weapon;
+  PRINTF(3)("Added a new Weapon to the WeaponManager: config %i/ slot %i\n", configID, slotID);
+}
+
+
+void WeaponManager::removeWeapon(Weapon* weapon, int configID)
+{
+  /* empty */
+}
+
+
+/**
+   * @brief changes to the next weapon configuration
+
+              if there are multiple weapon configurations defined by the manager, use this to switch between them
+              this function will deactivate the weapons first, change the config and reactivate them later
+ */
+              void WeaponManager::nextWeaponConf()
+{
+  PRINTF(4)("Changing weapon configuration: from %i to next\n", this->currConfID);
+
+  int i, lastConfID;
+  lastConfID = this->currConfID;
+  for(i = this->currConfID + 1; i < W_MAX_CONFIGS && !this->configs[i].bUsed; ++i);
+  if( i == W_MAX_CONFIGS) this->currConfID = W_CONFIG0;
+  else this->currConfID = i;
+
+
+  Weapon *w1, *w2;
+  for(int j = 0; j < W_MAX_SLOTS; ++j)
+  {
+    w1 = this->configs[lastConfID].slots[j];
+    w2 = this->configs[this->currConfID].slots[j];
+
+    if( w1 == w2)
+    {
+      printf("no need for change\n");
+    }
+    else
+    {
+      if( w1 != NULL )
+      {
+        w1->deactivate();
+        printf("deactivating %i,%i\n", j,lastConfID);
+      }
+      if( w2 != NULL)
+      {
+        w2->activate();
+        printf("activating %i,%i\n", j, this->currConfID);
+      }
+    }
+  }
+}
+
+
+
+/**
+   * @brief triggers fire of all weapons in the current weaponconfig
+ */
+              void WeaponManager::fire()
+{
+  Weapon* firingWeapon;
+  for(int i = 0; i < W_MAX_SLOTS; ++i)
+  {
+    firingWeapon = this->configs[this->currConfID].slots[i];
+    if( firingWeapon != NULL) firingWeapon->fire();
+  }
+}
+
+
+/**
+   * @brief triggers tick of all weapons in the current weaponconfig
+              * @param second passed since last tick
+ */
+              void WeaponManager::tick(float sec)
+{
+  Weapon* w;
+  for(int i = 0; i < W_MAX_SLOTS; ++i)
+  {
+    w = this->configs[this->currConfID].slots[i];
+    if( w != NULL) w->tick(sec);
+  }
+}
+
+
+/**
+   * @brief triggers draw of all weapons in the current weaponconfig
+ */
+void WeaponManager::draw()
+{
+  Weapon* w;
+  for(int i = 0; i < W_MAX_SLOTS; ++i)
+  {
+    w = this->configs[this->currConfID].slots[i];
+    if( w != NULL) w->draw();
+  }
+}
+
+
+/**
+   * @brief private gets the next free slot in a certain weaponconfig
+              * @param the selected weaponconfig
+ */
+              int WeaponManager::getNextFreeSlot(int configID)
+{
+  for( int i = 0; i < W_MAX_SLOTS; ++i)
+  {
+    if( this->configs[configID].slots[i] == NULL)
+      return i;
+  }
+  return -1;
+}
+
Index: orxonox/trunk/src/world_entities/weapons/weapon_manager.h
===================================================================
--- orxonox/trunk/src/world_entities/weapons/weapon_manager.h	(revision 4826)
+++ orxonox/trunk/src/world_entities/weapons/weapon_manager.h	(revision 4826)
@@ -0,0 +1,86 @@
+/*!
+    \file weapon.h
+    \brief a weapon that a player can use
+
+    A Player has a list of weapons, that can be choosen to shoot projectiles
+    (projectiles.{cc,h}) at ennemies. These weapons can be shooted sequentially
+    or (if able) combined. Therefore you can choose the weapon mode = choose
+    a weapon.
+
+    A weapon is characterized by:
+     o firing-rate: the initial firing rate of a weapon (1/s = Herz)
+     o slowdown-factor: this is a factor d: exp(-d*x), d is element of all positive R. it determines how fast the firing-rate will slow down. if no slowdown: d=0, the bigger d is, the faster the weapon will slow down!
+     o energy-consumption: this determines the energy that has to be used to produce this projectile = costs per projectile
+
+    Furthermore there are some other attributes, that will help to represent a firing
+    weapon in this world:
+     o sound file/ressource: this is a pointer to the sound-file/ressource. however it may be represented
+     o shooting animation
+
+
+     a player defines one or more weapon configurations. a player has got one to eight
+     weapon slots: places where weapons can be attached to. a weapon configuration
+     is a matching between weapons and slots.
+     Since its clear how many weapons a player will have, there is no list of weapons:
+     its hard coded and limited to 8 slots and 4 configs. More would be a waste of
+     memory and time you need to customize and change to a weapon config...
+ */
+
+#include "base_object.h"
+
+
+// FORWARD DECLARATION
+class Weapon;
+
+
+
+//! this is an identifier for the weapon config
+#define    W_CONFIG0     0
+#define    W_CONFIG1     1
+#define    W_CONFIG2     2
+#define    W_CONFIG3     3
+
+
+//! this is an identifier for the slot. there are up to 8 weapon slots -> this means there can't be more than 8 weapons at the same time
+#define    W_SLOT0       0
+#define    W_SLOT1       1
+#define    W_SLOT2       2
+#define    W_SLOT3       3
+#define    W_SLOT4       4
+#define    W_SLOT5       5
+#define    W_SLOT6       6
+#define    W_SLOT7       7
+#define    W_FREE_SLOT   99
+
+
+//! this is a weapon Configuration: it has up to 8 slots
+typedef struct weaponConfig {
+  bool           bUsed;                       //<! is set to true, if this configuration is
+  Weapon*        slots[8];
+};
+
+
+class WeaponManager : public BaseObject {
+  public:
+    WeaponManager(int nrOfSlots = 2);
+    WeaponManager(const TiXmlElement* root);
+    ~WeaponManager();
+
+    void init();
+    void loadParams(const TiXmlElement* root);
+
+    void addWeapon(Weapon* weapon, int configID = W_CONFIG0, int slotID = W_FREE_SLOT);
+    void removeWeapon(Weapon* weapon, int configID = W_CONFIG0);
+    void nextWeaponConf();
+
+    void fire();
+    void tick(float sec);
+    void draw();
+
+  private:
+    int                   nrOfSlots;               //<! number of weapon slots a ship has
+    int                   currConfID;              //<! the currently selected config
+    weaponConfig          configs[4];              //<! a list of four configurations
+
+    int getNextFreeSlot(int configID);
+};
