Index: data/media/levels/teamdeathmatch.oxw
===================================================================
--- data/media/levels/teamdeathmatch.oxw	(revision 5534)
+++ data/media/levels/teamdeathmatch.oxw	(revision 5534)
@@ -0,0 +1,76 @@
+<?lua
+  include("overlay/hudtemplates3.oxo")
+  include("overlay/stats.oxo")
+  include("levels/templates/spaceship_assff.oxt")
+  include("levels/templates/spaceship_H2.oxt")
+  include("levels/templates/spaceship_pirate.oxt")
+?>
+
+<Level
+ name         = "Waypoints"
+ description  = "Testing waypoings for AI controlled spaceships."
+ gametype     = TeamDeathmatch
+>
+  <Scene
+   ambientlight = "0.7, 0.6, 0.6"
+   skybox       = "Orxonox/skypanoramagen1"
+  >
+    <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
+
+    <TeamSpawnPoint team=0 position="0,  0,0" direction="1,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
+    <TeamSpawnPoint team=0 position="0, 50,0" direction="1,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
+    <TeamSpawnPoint team=0 position="0,100,0" direction="1,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
+    <TeamSpawnPoint team=0 position="0,150,0" direction="1,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
+
+    <TeamSpawnPoint team=1 position="2000,  0,0" direction="-1,0,0" spawnclass=SpaceShip pawndesign=spaceshippirate />
+    <TeamSpawnPoint team=1 position="2000, 50,0" direction="-1,0,0" spawnclass=SpaceShip pawndesign=spaceshippirate />
+    <TeamSpawnPoint team=1 position="2000,100,0" direction="-1,0,0" spawnclass=SpaceShip pawndesign=spaceshippirate />
+    <TeamSpawnPoint team=1 position="2000,150,0" direction="-1,0,0" spawnclass=SpaceShip pawndesign=spaceshippirate />
+
+    <TeamSpawnPoint team=2 position="1000,  0,1500" direction="0,0,-1" spawnclass=SpaceShip pawndesign=spaceshipHtwo />
+    <TeamSpawnPoint team=2 position="1000, 50,1500" direction="0,0,-1" spawnclass=SpaceShip pawndesign=spaceshipHtwo />
+    <TeamSpawnPoint team=2 position="1000,100,1500" direction="0,0,-1" spawnclass=SpaceShip pawndesign=spaceshipHtwo />
+    <TeamSpawnPoint team=2 position="1000,150,1500" direction="0,0,-1" spawnclass=SpaceShip pawndesign=spaceshipHtwo />
+
+
+<?lua
+for i = 1, 70, 1
+do ?>
+  <MovableEntity position="<?lua print(math.random() * 6000 - 3000)?>, <?lua print(math.random() * 6000 - 3000) ?>, <?lua print(math.random() * 1000 + 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
+    <attached>
+      <Model scale="<?lua print(math.random() * 50 + 20) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
+    </attached>
+  </MovableEntity>
+  <MovableEntity position="<?lua print(math.random() * 6000 - 3000)?>, <?lua print(math.random() * 6000 - 3000) ?>, <?lua print(math.random() * -1000 - 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
+    <attached>
+      <Model scale="<?lua print(math.random() * 50 + 20) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
+    </attached>
+  </MovableEntity>
+
+  <MovableEntity position="<?lua print(math.random() * 6000 - 3000)?>, <?lua print(math.random() * 1000 + 3000) ?>, <?lua print(math.random() * 6000 - 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
+    <attached>
+      <Model scale="<?lua print(math.random() * 50 + 20) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
+    </attached>
+  </MovableEntity>
+  <MovableEntity position="<?lua print(math.random() * 6000 - 3000)?>, <?lua print(math.random() * -1000 - 3000) ?>, <?lua print(math.random() * 6000 - 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
+    <attached>
+      <Model scale="<?lua print(math.random() * 50 + 20) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
+    </attached>
+  </MovableEntity>
+
+  <MovableEntity position="<?lua print(math.random() * 1000 + 3000)?>, <?lua print(math.random() * 6000 - 3000) ?>, <?lua print(math.random() * 6000 - 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
+    <attached>
+      <Model scale="<?lua print(math.random() * 50 + 20) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
+    </attached>
+  </MovableEntity>
+  <MovableEntity position="<?lua print(math.random() * -1000 - 3000)?>, <?lua print(math.random() * 6000 - 3000) ?>, <?lua print(math.random() * 6000 - 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
+    <attached>
+      <Model scale="<?lua print(math.random() * 50 + 20) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
+    </attached>
+  </MovableEntity>
+<?lua
+end
+?>
+
+  </Scene>
+</Level>
Index: data/media/levels/waypoints.oxw
===================================================================
--- data/media/levels/waypoints.oxw	(revision 5534)
+++ data/media/levels/waypoints.oxw	(revision 5534)
@@ -0,0 +1,86 @@
+<?lua
+  include("overlay/hudtemplates3.oxo")
+  include("overlay/stats.oxo")
+  include("levels/templates/spaceship_assff.oxt")
+  include("levels/templates/spaceship_H2.oxt")
+  include("levels/templates/spaceship_pirate.oxt")
+?>
+
+<Level
+ name         = "Waypoints"
+ description  = "Testing waypoings for AI controlled spaceships."
+>
+  <Scene
+   ambientlight = "0.5, 0.5, 0.5"
+   skybox       = "Orxonox/skypanoramagen1"
+  >
+    <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
+
+    <SpawnPoint position="0,0,0" direction="1,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
+
+    <SpaceShip position="0,2000,200" lookat="0,0,0" >
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <WaypointPatrolController alertnessradius=1000 team=10>
+          <waypoints>
+            <Model mesh="cube.mesh" scale=1 position="  0,2000,-200" />
+            <Model mesh="cube.mesh" scale=2 position="  0,2000,-700" />
+            <Model mesh="cube.mesh" scale=4 position="500,2000,-700" />
+            <Model mesh="cube.mesh" scale=8 position="500,2000,-200" />
+          </waypoints>
+        </WaypointPatrolController>
+      </controller>
+    </SpaceShip>
+    <SpaceShip position="0,2000,400" lookat="0,0,0" >
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <WaypointPatrolController alertnessradius=1000 team=10>
+          <waypoints>
+            <Model mesh="cube.mesh" scale=1 position="  0,2000,-200" />
+            <Model mesh="cube.mesh" scale=2 position="  0,2000,-700" />
+            <Model mesh="cube.mesh" scale=4 position="500,2000,-700" />
+            <Model mesh="cube.mesh" scale=8 position="500,2000,-200" />
+          </waypoints>
+        </WaypointPatrolController>
+      </controller>
+    </SpaceShip>
+
+    <SpaceShip position="1500,2000,200" lookat="0,0,0" >
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <WaypointPatrolController alertnessradius=1000 team=11>
+          <waypoints>
+            <Model mesh="cube.mesh" scale=1 position="1500,2000,-200" />
+            <Model mesh="cube.mesh" scale=2 position="1500,2000,-700" />
+            <Model mesh="cube.mesh" scale=4 position="1000,2000,-700" />
+            <Model mesh="cube.mesh" scale=8 position="1000,2000,-200" />
+          </waypoints>
+        </WaypointPatrolController>
+      </controller>
+    </SpaceShip>
+
+<!--
+<?lua
+for i = 1, 50, 1
+do ?>
+    <SpaceShip position="<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>" lookat="0,0,0" >
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <AIController />
+      </controller>
+    </SpaceShip>
+<?lua
+end
+?>
+-->
+
+  </Scene>
+</Level>
