Index: /branches/world_entities/src/Makefile.am
===================================================================
--- /branches/world_entities/src/Makefile.am	(revision 5526)
+++ /branches/world_entities/src/Makefile.am	(revision 5527)
@@ -62,4 +62,5 @@
                   world_entities/weapons/test_gun.cc \
                   world_entities/weapons/turret.cc \
+                  world_entities/weapons/aiming_turret.cc \
                   world_entities/weapons/test_bullet.cc \
                   world_entities/weapons/rocket.cc \
@@ -95,4 +96,5 @@
                  world_entities/weapons/test_gun.h \
                  world_entities/weapons/turret.h \
+                 world_entities/weapons/aiming_turret.h \
                  world_entities/weapons/test_bullet.h \
                  world_entities/weapons/rocket.h \
Index: /branches/world_entities/src/Makefile.in
===================================================================
--- /branches/world_entities/src/Makefile.in	(revision 5526)
+++ /branches/world_entities/src/Makefile.in	(revision 5527)
@@ -65,7 +65,8 @@
 	orxonox-weapon.$(OBJEXT) orxonox-projectile.$(OBJEXT) \
 	orxonox-test_gun.$(OBJEXT) orxonox-turret.$(OBJEXT) \
-	orxonox-test_bullet.$(OBJEXT) orxonox-rocket.$(OBJEXT) \
-	orxonox-laser.$(OBJEXT) orxonox-crosshair.$(OBJEXT) \
-	orxonox-power_up.$(OBJEXT) orxonox-turret_power_up.$(OBJEXT) \
+	orxonox-aiming_turret.$(OBJEXT) orxonox-test_bullet.$(OBJEXT) \
+	orxonox-rocket.$(OBJEXT) orxonox-laser.$(OBJEXT) \
+	orxonox-crosshair.$(OBJEXT) orxonox-power_up.$(OBJEXT) \
+	orxonox-turret_power_up.$(OBJEXT) \
 	orxonox-laser_power_up.$(OBJEXT) orxonox-benchmark.$(OBJEXT)
 orxonox_OBJECTS = $(am_orxonox_OBJECTS)
@@ -256,4 +257,5 @@
                   world_entities/weapons/test_gun.cc \
                   world_entities/weapons/turret.cc \
+                  world_entities/weapons/aiming_turret.cc \
                   world_entities/weapons/test_bullet.cc \
                   world_entities/weapons/rocket.cc \
@@ -289,4 +291,5 @@
                  world_entities/weapons/test_gun.h \
                  world_entities/weapons/turret.h \
+                 world_entities/weapons/aiming_turret.h \
                  world_entities/weapons/test_bullet.h \
                  world_entities/weapons/rocket.h \
@@ -339,7 +342,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  src/Makefile
+	  $(AUTOMAKE) --gnu  src/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@@ -392,4 +395,5 @@
 	-rm -f *.tab.c
 
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox-aiming_turret.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox-benchmark.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox-camera.Po@am__quote@
@@ -729,4 +733,18 @@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o orxonox-turret.obj `if test -f 'world_entities/weapons/turret.cc'; then $(CYGPATH_W) 'world_entities/weapons/turret.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/weapons/turret.cc'; fi`
+
+orxonox-aiming_turret.o: world_entities/weapons/aiming_turret.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT orxonox-aiming_turret.o -MD -MP -MF "$(DEPDIR)/orxonox-aiming_turret.Tpo" -c -o orxonox-aiming_turret.o `test -f 'world_entities/weapons/aiming_turret.cc' || echo '$(srcdir)/'`world_entities/weapons/aiming_turret.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/orxonox-aiming_turret.Tpo" "$(DEPDIR)/orxonox-aiming_turret.Po"; else rm -f "$(DEPDIR)/orxonox-aiming_turret.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='world_entities/weapons/aiming_turret.cc' object='orxonox-aiming_turret.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o orxonox-aiming_turret.o `test -f 'world_entities/weapons/aiming_turret.cc' || echo '$(srcdir)/'`world_entities/weapons/aiming_turret.cc
+
+orxonox-aiming_turret.obj: world_entities/weapons/aiming_turret.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT orxonox-aiming_turret.obj -MD -MP -MF "$(DEPDIR)/orxonox-aiming_turret.Tpo" -c -o orxonox-aiming_turret.obj `if test -f 'world_entities/weapons/aiming_turret.cc'; then $(CYGPATH_W) 'world_entities/weapons/aiming_turret.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/weapons/aiming_turret.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/orxonox-aiming_turret.Tpo" "$(DEPDIR)/orxonox-aiming_turret.Po"; else rm -f "$(DEPDIR)/orxonox-aiming_turret.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='world_entities/weapons/aiming_turret.cc' object='orxonox-aiming_turret.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o orxonox-aiming_turret.obj `if test -f 'world_entities/weapons/aiming_turret.cc'; then $(CYGPATH_W) 'world_entities/weapons/aiming_turret.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/weapons/aiming_turret.cc'; fi`
 
 orxonox-test_bullet.o: world_entities/weapons/test_bullet.cc
Index: /branches/world_entities/src/defs/class_id.h
===================================================================
--- /branches/world_entities/src/defs/class_id.h	(revision 5526)
+++ /branches/world_entities/src/defs/class_id.h	(revision 5527)
@@ -135,4 +135,5 @@
   CL_TEST_GUN                   =    0x00000230,
   CL_TURRET                     =    0x00000231,
+  CL_AIMING_TURRET              =    0x00000232,
 
 
Index: /branches/world_entities/src/lib/Makefile.in
===================================================================
--- /branches/world_entities/src/lib/Makefile.in	(revision 5526)
+++ /branches/world_entities/src/lib/Makefile.in	(revision 5527)
@@ -270,7 +270,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  src/lib/Makefile
+	  $(AUTOMAKE) --gnu  src/lib/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: /branches/world_entities/src/lib/collision_detection/Makefile.in
===================================================================
--- /branches/world_entities/src/lib/collision_detection/Makefile.in	(revision 5526)
+++ /branches/world_entities/src/lib/collision_detection/Makefile.in	(revision 5527)
@@ -220,7 +220,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/collision_detection/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/collision_detection/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  src/lib/collision_detection/Makefile
+	  $(AUTOMAKE) --gnu  src/lib/collision_detection/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: /branches/world_entities/src/lib/event/Makefile.in
===================================================================
--- /branches/world_entities/src/lib/event/Makefile.in	(revision 5526)
+++ /branches/world_entities/src/lib/event/Makefile.in	(revision 5527)
@@ -210,7 +210,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/event/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/event/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  src/lib/event/Makefile
+	  $(AUTOMAKE) --gnu  src/lib/event/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: /branches/world_entities/src/lib/graphics/Makefile.in
===================================================================
--- /branches/world_entities/src/lib/graphics/Makefile.in	(revision 5526)
+++ /branches/world_entities/src/lib/graphics/Makefile.in	(revision 5527)
@@ -227,7 +227,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/graphics/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/graphics/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  src/lib/graphics/Makefile
+	  $(AUTOMAKE) --gnu  src/lib/graphics/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: /branches/world_entities/src/lib/graphics/importer/Makefile.in
===================================================================
--- /branches/world_entities/src/lib/graphics/importer/Makefile.in	(revision 5526)
+++ /branches/world_entities/src/lib/graphics/importer/Makefile.in	(revision 5527)
@@ -214,7 +214,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/graphics/importer/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/graphics/importer/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  src/lib/graphics/importer/Makefile
+	  $(AUTOMAKE) --gnu  src/lib/graphics/importer/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: /branches/world_entities/src/lib/graphics/spatial_separation/Makefile.in
===================================================================
--- /branches/world_entities/src/lib/graphics/spatial_separation/Makefile.in	(revision 5526)
+++ /branches/world_entities/src/lib/graphics/spatial_separation/Makefile.in	(revision 5527)
@@ -204,7 +204,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/graphics/spatial_separation/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/graphics/spatial_separation/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  src/lib/graphics/spatial_separation/Makefile
+	  $(AUTOMAKE) --gnu  src/lib/graphics/spatial_separation/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: /branches/world_entities/src/lib/gui/Makefile.in
===================================================================
--- /branches/world_entities/src/lib/gui/Makefile.in	(revision 5526)
+++ /branches/world_entities/src/lib/gui/Makefile.in	(revision 5527)
@@ -183,7 +183,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/gui/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/gui/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  src/lib/gui/Makefile
+	  $(AUTOMAKE) --gnu  src/lib/gui/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: /branches/world_entities/src/lib/gui/gl_gui/Makefile.in
===================================================================
--- /branches/world_entities/src/lib/gui/gl_gui/Makefile.in	(revision 5526)
+++ /branches/world_entities/src/lib/gui/gl_gui/Makefile.in	(revision 5527)
@@ -230,7 +230,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/gui/gl_gui/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/gui/gl_gui/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  src/lib/gui/gl_gui/Makefile
+	  $(AUTOMAKE) --gnu  src/lib/gui/gl_gui/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: /branches/world_entities/src/lib/gui/gtk_gui/Makefile.in
===================================================================
--- /branches/world_entities/src/lib/gui/gtk_gui/Makefile.in	(revision 5526)
+++ /branches/world_entities/src/lib/gui/gtk_gui/Makefile.in	(revision 5527)
@@ -232,7 +232,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/gui/gtk_gui/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/gui/gtk_gui/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  src/lib/gui/gtk_gui/Makefile
+	  $(AUTOMAKE) --gnu  src/lib/gui/gtk_gui/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: /branches/world_entities/src/lib/particles/Makefile.in
===================================================================
--- /branches/world_entities/src/lib/particles/Makefile.in	(revision 5526)
+++ /branches/world_entities/src/lib/particles/Makefile.in	(revision 5527)
@@ -207,7 +207,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/particles/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/particles/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  src/lib/particles/Makefile
+	  $(AUTOMAKE) --gnu  src/lib/particles/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: /branches/world_entities/src/lib/physics/Makefile.in
===================================================================
--- /branches/world_entities/src/lib/physics/Makefile.in	(revision 5526)
+++ /branches/world_entities/src/lib/physics/Makefile.in	(revision 5527)
@@ -215,7 +215,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/physics/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/physics/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  src/lib/physics/Makefile
+	  $(AUTOMAKE) --gnu  src/lib/physics/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: /branches/world_entities/src/lib/shell/Makefile.in
===================================================================
--- /branches/world_entities/src/lib/shell/Makefile.in	(revision 5526)
+++ /branches/world_entities/src/lib/shell/Makefile.in	(revision 5527)
@@ -209,7 +209,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/shell/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/shell/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  src/lib/shell/Makefile
+	  $(AUTOMAKE) --gnu  src/lib/shell/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: /branches/world_entities/src/lib/sound/Makefile.in
===================================================================
--- /branches/world_entities/src/lib/sound/Makefile.in	(revision 5526)
+++ /branches/world_entities/src/lib/sound/Makefile.in	(revision 5527)
@@ -207,7 +207,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/sound/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/sound/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  src/lib/sound/Makefile
+	  $(AUTOMAKE) --gnu  src/lib/sound/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: /branches/world_entities/src/lib/tinyxml/Makefile.in
===================================================================
--- /branches/world_entities/src/lib/tinyxml/Makefile.in	(revision 5526)
+++ /branches/world_entities/src/lib/tinyxml/Makefile.in	(revision 5527)
@@ -203,7 +203,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/tinyxml/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/tinyxml/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  src/lib/tinyxml/Makefile
+	  $(AUTOMAKE) --gnu  src/lib/tinyxml/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: /branches/world_entities/src/subprojects/Makefile.in
===================================================================
--- /branches/world_entities/src/subprojects/Makefile.in	(revision 5526)
+++ /branches/world_entities/src/subprojects/Makefile.in	(revision 5527)
@@ -190,7 +190,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/subprojects/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/subprojects/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  src/subprojects/Makefile
+	  $(AUTOMAKE) --gnu  src/subprojects/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: /branches/world_entities/src/subprojects/collision_detection/Makefile.in
===================================================================
--- /branches/world_entities/src/subprojects/collision_detection/Makefile.in	(revision 5526)
+++ /branches/world_entities/src/subprojects/collision_detection/Makefile.in	(revision 5527)
@@ -259,7 +259,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/subprojects/collision_detection/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/subprojects/collision_detection/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  src/subprojects/collision_detection/Makefile
+	  $(AUTOMAKE) --gnu  src/subprojects/collision_detection/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: /branches/world_entities/src/subprojects/importer/Makefile.in
===================================================================
--- /branches/world_entities/src/subprojects/importer/Makefile.in	(revision 5526)
+++ /branches/world_entities/src/subprojects/importer/Makefile.in	(revision 5527)
@@ -231,7 +231,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/subprojects/importer/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/subprojects/importer/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  src/subprojects/importer/Makefile
+	  $(AUTOMAKE) --gnu  src/subprojects/importer/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: /branches/world_entities/src/subprojects/particles/Makefile.in
===================================================================
--- /branches/world_entities/src/subprojects/particles/Makefile.in	(revision 5526)
+++ /branches/world_entities/src/subprojects/particles/Makefile.in	(revision 5527)
@@ -251,7 +251,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/subprojects/particles/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/subprojects/particles/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  src/subprojects/particles/Makefile
+	  $(AUTOMAKE) --gnu  src/subprojects/particles/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: /branches/world_entities/src/subprojects/testmain/Makefile.in
===================================================================
--- /branches/world_entities/src/subprojects/testmain/Makefile.in	(revision 5526)
+++ /branches/world_entities/src/subprojects/testmain/Makefile.in	(revision 5527)
@@ -197,7 +197,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/subprojects/testmain/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/subprojects/testmain/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  src/subprojects/testmain/Makefile
+	  $(AUTOMAKE) --gnu  src/subprojects/testmain/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: /branches/world_entities/src/util/Makefile.in
===================================================================
--- /branches/world_entities/src/util/Makefile.in	(revision 5526)
+++ /branches/world_entities/src/util/Makefile.in	(revision 5527)
@@ -233,7 +233,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/util/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/util/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  src/util/Makefile
+	  $(AUTOMAKE) --gnu  src/util/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: /branches/world_entities/src/world_entities/player.cc
===================================================================
--- /branches/world_entities/src/world_entities/player.cc	(revision 5526)
+++ /branches/world_entities/src/world_entities/player.cc	(revision 5527)
@@ -337,8 +337,14 @@
 }
 
+#include "aiming_turret.h"
 // FIXME THIS MIGHT BE CONSIDERED EITHER A FEATURE, OR A BUG
 void Player::ADDWEAPON()
 {
-  Weapon* turret1 = new Turret(this->weaponMan);
+  Weapon* turret1;
+  if ((float)rand()/RAND_MAX < .7)
+    turret1 = new Turret(this->weaponMan);
+  else
+    turret1 = new AimingTurret(this->weaponMan);
+
   turret1->setName("Turret");
   turret1->setStateDuration(WS_SHOOTING, (float)rand()/RAND_MAX*.5+.1);
Index: /branches/world_entities/src/world_entities/weapons/aiming_turret.cc
===================================================================
--- /branches/world_entities/src/world_entities/weapons/aiming_turret.cc	(revision 5527)
+++ /branches/world_entities/src/world_entities/weapons/aiming_turret.cc	(revision 5527)
@@ -0,0 +1,180 @@
+/*
+   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: Benjamin Grauer
+   co-programmer:
+*/
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WEAPON
+
+#include "aiming_turret.h"
+
+#include "weapon_manager.h"
+#include "projectile.h"
+
+#include "model.h"
+
+#include "null_parent.h"
+#include "state.h"
+#include "list.h"
+#include "animation3d.h"
+#include "sound_engine.h"
+
+#include "factory.h"
+
+CREATE_FACTORY(AimingTurret);
+
+using namespace std;
+
+
+/**
+ *  standard constructor
+
+   creates a new weapon
+*/
+AimingTurret::AimingTurret (WeaponManager* weaponManager)
+  : Weapon(weaponManager)
+{
+  this->init();
+
+  this->loadModel("models/guns/turret1.obj");
+
+
+  this->setActionSound(WA_SHOOT, "sound/shot1.wav");
+  this->setActionSound(WA_ACTIVATE, "sound/vocals/missiles.wav");
+  this->setActionSound(WA_RELOAD, "sound/vocals/reload.wav");
+}
+
+
+AimingTurret::AimingTurret(const TiXmlElement* root)
+{
+  this->init();
+  this->loadParams(root);
+}
+
+/**
+ *  standard deconstructor
+*/
+AimingTurret::~AimingTurret ()
+{
+  // model will be deleted from WorldEntity-destructor
+}
+
+void AimingTurret::init()
+{
+  this->setClassID(CL_AIMING_TURRET, "AimingTurret");
+
+  Animation3D* animation1 = this->getAnimation(WS_ACTIVATING, this);
+  Animation3D* animation2 = this->getAnimation(WS_DEACTIVATING, this);
+
+  animation1->addKeyFrame(Vector(0, -.5, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
+  animation1->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
+  animation2->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
+  animation2->addKeyFrame(Vector(0, -.5, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
+
+  animation1->setInfinity(ANIM_INF_CONSTANT);
+  animation2->setInfinity(ANIM_INF_CONSTANT);
+
+  this->setStateDuration(WS_SHOOTING, .1);
+  this->setStateDuration(WS_RELOADING, .1);
+  this->setStateDuration(WS_ACTIVATING, .4);
+  this->setStateDuration(WS_DEACTIVATING, .4);
+
+  this->setMaximumEnergy(10000, 50);
+  this->increaseEnergy(100000);
+  //this->minCharge = 2;
+
+  this->setCapability(WTYPE_ALLDIRS | WTYPE_TURRET);
+  this->setProjectileType(CL_ROCKET);
+
+
+  this->setEmissionPoint(1.684, 0.472, 0);
+  //this->getProjectileFactory()->prepare(100);
+
+  this->target = NULL;
+}
+
+void AimingTurret::loadParams(const TiXmlElement* root)
+{
+  static_cast<Weapon*>(this)->loadParams(root);
+
+}
+
+void AimingTurret::activate()
+{
+}
+
+void AimingTurret::deactivate()
+{
+}
+
+void AimingTurret::tick(float dt)
+{
+  Quaternion quat;
+  if (this->target == NULL)
+    this->target = this->getWeaponManager()->getDistanceTarget(this, 50);
+  Vector direction = this->target->getAbsCoor() - this->getAbsCoor();
+
+  direction.normalize();
+
+  if (likely (this->getParent() != NULL))
+    quat = Quaternion(direction, this->getParent()->getAbsDir().apply(Vector(0,1,0))) * Quaternion ( -M_PI_2, Vector(0,1,0)) ;
+  else
+    quat = Quaternion(direction, Vector(0,1,0)) * Quaternion ( -M_PI_2, Vector(0,1,0)) ;
+
+  this->setAbsDirSoft(quat, 20);
+}
+
+void AimingTurret::fire()
+{
+  Projectile* pj = this->getProjectile();
+  if (pj == NULL)
+    return;
+
+  PNode* target = this->getWeaponManager()->getFixedTarget();
+
+  if (target != NULL)
+  {
+    pj->setVelocity(/*this->getVelocity()+*/(this->getAbsDir().apply(Vector(1,0,0))*100.0 + VECTOR_RAND(13)
+            /*target->getAbsCoor() - this->getAbsCoor()*/)*.5);//this->getVelocity());
+  }
+  else
+    pj->setVelocity(target->getVelocity());
+
+  pj->setParent(NullParent::getInstance());
+  pj->setAbsCoor(this->getEmissionPoint());
+  pj->setAbsDir(this->getAbsDir());
+  pj->activate();
+  this->target = this->getWeaponManager()->getDistanceTarget(this, 50);
+}
+
+void AimingTurret::destroy ()
+{}
+
+/**
+ * draws the AimingTurret
+*/
+void AimingTurret::draw () const
+{
+  this->getWeaponManager()->getFixedTarget()->debugDraw(10);
+
+  /* draw gun body */
+  glMatrixMode(GL_MODELVIEW);
+  glPushMatrix();
+  glTranslatef (this->getAbsCoor ().x,
+                this->getAbsCoor ().y,
+                this->getAbsCoor ().z);
+  Vector tmpRot = this->getAbsDir().getSpacialAxis();
+  glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
+
+  this->model->draw();
+  glPopMatrix();
+}
+
Index: /branches/world_entities/src/world_entities/weapons/aiming_turret.h
===================================================================
--- /branches/world_entities/src/world_entities/weapons/aiming_turret.h	(revision 5527)
+++ /branches/world_entities/src/world_entities/weapons/aiming_turret.h	(revision 5527)
@@ -0,0 +1,34 @@
+/*!
+ * @file aiming_turret.h
+*/
+
+
+#ifndef _AIMING_TURRET_H
+#define _AIMING_TURRET_H
+
+#include "weapon.h"
+
+class AimingTurret : public Weapon
+  {
+  public:
+    AimingTurret (WeaponManager* weaponManager);
+    AimingTurret(const TiXmlElement* root);
+    virtual ~AimingTurret ();
+
+    void init();
+    void loadParams(const TiXmlElement* root);
+
+    virtual void activate();
+    virtual void deactivate();
+
+    virtual void tick(float dt);
+    virtual void fire();
+    virtual void destroy();
+
+    virtual void draw() const;
+
+  private:
+    PNode*          target;
+  };
+
+#endif /* _AIMING_TURRET_H */
Index: /branches/world_entities/src/world_entities/weapons/weapon_manager.cc
===================================================================
--- /branches/world_entities/src/world_entities/weapons/weapon_manager.cc	(revision 5526)
+++ /branches/world_entities/src/world_entities/weapons/weapon_manager.cc	(revision 5527)
@@ -23,10 +23,11 @@
 #include "crosshair.h"
 
+#include "class_list.h"
 #include "load_param.h"
 #include "factory.h"
-#include "vector.h"
 #include "list.h"
 #include "t_animation.h"
 #include "null_parent.h"
+
 
 using namespace std;
@@ -109,4 +110,6 @@
   this->crossHairSizeAnim->addKeyFrame(100, .05, ANIM_LINEAR);
   this->crossHairSizeAnim->addKeyFrame(50, .01, ANIM_LINEAR);
+
+  this->targetIterator = NULL;
 }
 
@@ -140,5 +143,4 @@
 
   Weapon* newWeapon = dynamic_cast<Weapon*>(Factory::getFirst()->fabricate(element));
-
 
 
@@ -334,4 +336,57 @@
     }
   }
+}
+
+
+/**
+ * Selects an Entity from the NPC-list, and returns the Target
+ */
+PNode* WeaponManager::getSomeTarget()
+{
+   if (this->targetIterator == NULL)
+   {
+     tList<BaseObject>* npcList = ClassList::getList(CL_NPC);
+     if (npcList != NULL)
+     {
+       this->targetIterator = npcList->getIterator();
+       this->targetIterator->firstElement();
+     }
+     else
+       return NULL;
+   }
+
+   PNode* retNode = dynamic_cast<PNode*>(targetIterator->nextElement());
+   if (retNode == NULL && this->targetIterator->getList()->getSize() > 0)
+     retNode =  dynamic_cast<PNode*>(targetIterator->firstElement());
+
+   return retNode;
+}
+
+
+/**
+ * Selects an Entity from the Entity-List, that is near of the carrier PNode.
+ * @param carrier: The PNode from which the distance should be measured
+ * @param distance: The Maximum Distance to Return.
+ */
+PNode* WeaponManager::getDistanceTarget(const PNode* carrier, float distance)
+{
+  tList<BaseObject>* npcList = ClassList::getList(CL_NPC);
+  if (npcList != NULL)
+  {
+    tIterator<BaseObject>* npcIT = npcList->getIterator();
+    PNode* tmpNPC = dynamic_cast<PNode*>(npcIT->firstElement());
+    while (tmpNPC != NULL)
+    {
+      if ((carrier->getAbsCoor() - tmpNPC->getAbsCoor()).len() < distance)
+      {
+        delete npcIT;
+        return tmpNPC;
+      }
+      tmpNPC = dynamic_cast<PNode*>(npcIT->nextElement());
+    }
+    delete npcIT;
+  }
+  return this->getFixedTarget();
+
 }
 
Index: /branches/world_entities/src/world_entities/weapons/weapon_manager.h
===================================================================
--- /branches/world_entities/src/world_entities/weapons/weapon_manager.h	(revision 5526)
+++ /branches/world_entities/src/world_entities/weapons/weapon_manager.h	(revision 5527)
@@ -17,4 +17,5 @@
 // FORWARD DECLARATION
 template <class T> class tAnimation;
+template <class T> class tIterator;
 
 
@@ -77,6 +78,11 @@
 
     /** @returns a fixed target namely the Crosshair's 3D position */
-    inline PNode* getFixedTarget() { return this->crosshair; };
+    inline PNode* getFixedTarget() const { return this->crosshair; };
+    PNode* getSomeTarget();
+    PNode* getDistanceTarget(const PNode* carrier, float distance);
+
     void fire();
+    //! @TODO: implement this function (maybe also in Weapon itself)
+    void releaseFire();
 
     void tick(float dt);
@@ -102,3 +108,5 @@
     Crosshair*              crosshair;                                //!< an aim.
     tAnimation<Crosshair>*  crossHairSizeAnim;                        //!< An animation for the crosshair (scaling)
+
+    tIterator<BaseObject>*  targetIterator;                           //!< An iterator for traversion lists of enemies.
 };
