Index: /data/branches/single_player_map/scripts/falldown.lua
===================================================================
--- /data/branches/single_player_map/scripts/falldown.lua	(revision 4065)
+++ /data/branches/single_player_map/scripts/falldown.lua	(revision 4066)
@@ -19,5 +19,5 @@
 
 function fallDown(timestep)
-dy = dy + timestep*0.1
+dy = dy + timestep
 thisX = fallingguy:getAbsCoorX()
 thisY = fallingguy:getAbsCoorY()
Index: /data/branches/single_player_map/scripts/floorguy.lua
===================================================================
--- /data/branches/single_player_map/scripts/floorguy.lua	(revision 4065)
+++ /data/branches/single_player_map/scripts/floorguy.lua	(revision 4066)
@@ -4,5 +4,5 @@
 
 programRoute = true
-height = 80
+height = 10
 
 function tick(timestep)
Index: /data/branches/single_player_map/scripts/guard.lua
===================================================================
--- /data/branches/single_player_map/scripts/guard.lua	(revision 4065)
+++ /data/branches/single_player_map/scripts/guard.lua	(revision 4066)
@@ -8,7 +8,7 @@
 playerInLock = false
 hangarReached = false
-guardStopped = false
-
-height = 35
+guardStopped = true
+
+height = 29
 
 -- Returns the distance between (x1,x2,x3) and (y1,y2,y3)
@@ -28,11 +28,18 @@
 playerZ = Player:getAbsCoorZ()
 
-if dist( guardX,guardY,guardZ,playerX, playerX, playerX) > 30 and hangarRouteProgrammed then
- --guard:stop()
+
+distance = dist( guardX,guardY,guardZ,playerX, playerY, playerZ)
+
+io.write(distance, " \n")
+
+if dist( guardX,guardY,guardZ,playerX, playerY, playerZ) > 100 and hangarRouteProgrammed and not guardStopped then
+ io.write("guard stopped\n")
+ guard:stop()
  guardStopped = true
 end
 
-if dist( guardX,guardY,guardZ,playerX, playerX, playerX) < 30 and hangarRouteProgrammed and guardStopped then
- --guard:continue()
+if dist( guardX,guardY,guardZ,playerX, playerY, playerZ) < 100 and hangarRouteProgrammed and guardStopped then
+io.write("guard resumed")
+ guard:continue()
  guardStopped = false
 end
@@ -104,10 +111,10 @@
 
 if not exitRouteProgrammed then
-guard:walkTo( 162.096558, height, 274.944366)
-guard:walkTo( 161.519516, height, 286.673370)
-guard:walkTo( 161.098618, height, 295.228699)
-guard:walkTo( 160.568466, height, 306.004486)
-guard:walkTo( 160.151169, height, 314.486572)
-guard:walkTo( 159.416641, height, 324.925232)
+guard:runTo( 162.096558, height, 274.944366)
+guard:runTo( 161.519516, height, 286.673370)
+guard:runTo( 161.098618, height, 295.228699)
+guard:runTo( 160.568466, height, 306.004486)
+guard:runTo( 160.151169, height, 314.486572)
+guard:runTo( 159.416641, height, 324.925232)
 guard:walkTo( 158.700073, height, 335.108154)
 guard:walkTo( 157.943298, height, 345.862610)
Index: /data/branches/single_player_map/scripts/prisoner.lua
===================================================================
--- /data/branches/single_player_map/scripts/prisoner.lua	(revision 4065)
+++ /data/branches/single_player_map/scripts/prisoner.lua	(revision 4066)
@@ -52,10 +52,10 @@
 
 
-if dist( guardX,guardY,guardZ,playerX, playerX, playerX) > 30 and hangarProgrammed then
+if dist( guardX,guardY,guardZ,playerX, playerY, playerZ) > 30 and hangarProgrammed then
  prisoner:stop()
  guardStopped = true
 end
 
-if dist( guardX,guardY,guardZ,playerX, playerX, playerX) < 30 and hangarProgrammed and guardStopped then
+if dist( guardX,guardY,guardZ,playerX, playerY, playerZ) < 30 and hangarProgrammed and guardStopped then
  --prisoner:continue()
  guardStopped = false
Index: /data/branches/single_player_map/scripts/secondguard.lua
===================================================================
--- /data/branches/single_player_map/scripts/secondguard.lua	(revision 4065)
+++ /data/branches/single_player_map/scripts/secondguard.lua	(revision 4066)
@@ -12,5 +12,5 @@
 hangarReached = false
 
-height = 29
+height = 80
 
 -- Returns the distance between (x1,x2,x3) and (y1,y2,y3)
@@ -41,10 +41,10 @@
 playerZ = Player:getAbsCoorZ()
 
-if dist( guardX,guardY,guardZ,playerX, playerX, playerX) > 30 and hangarProgrammed then
+if dist( guardX,guardY,guardZ,playerX, playerY, playerZ) > 30 and hangarProgrammed then
  secondguard:stop()
  guardStopped = true
 end
 
-if dist( guardX,guardY,guardZ,playerX, playerX, playerX) < 30 and hangarProgrammed and guardStopped then
+if dist( guardX,guardY,guardZ,playerX, playerY, playerZ) < 30 and hangarProgrammed and guardStopped then
  --secondguard:continue()
  guardStopped = false
Index: /data/branches/single_player_map/worlds/sp_level_ambush_at_jupiter.oxw
===================================================================
--- /data/branches/single_player_map/worlds/sp_level_ambush_at_jupiter.oxw	(revision 4065)
+++ /data/branches/single_player_map/worlds/sp_level_ambush_at_jupiter.oxw	(revision 4066)
@@ -144,5 +144,5 @@
        <model>models/creatures/doom_guy.md2, 10</model>
        <md2texture>doom_guy.png</md2texture>
-       <abs-coor>440, 29, 180</abs-coor>
+       <abs-coor>440, 80, 180</abs-coor>
        <abs-dir>-3.1, 0, 1, 0</abs-dir>
     </GenericNPC>
