# HG changeset patch
# User Periklis Ntanasis <pntanasis@gmail.com>
# Date 1375389823 -10800
# Node ID 3fd77bcdd725da1fb69566b227b28e532be58ddf
# Parent  00f07e32313a9bfa1d6044270b3ea6b0531a6f5d
checkpoint 5

diff -r 00f07e32313a -r 3fd77bcdd725 share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua	Thu Aug 01 23:16:00 2013 +0300
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua	Thu Aug 01 23:43:43 2013 +0300
@@ -132,6 +132,8 @@
 		HogTurnLeft(hero.gear, true)
 	elseif checkPointReached == 4 then
 		AnimSetGearPosition(hero.gear, 1160, 1180)
+	elseif checkPointReached == 5 then
+		AnimSetGearPosition(hero.gear, girderX, girderY)
 	end
 	
 	AnimInit()
@@ -215,7 +217,7 @@
 		loadHeroAmmo()
 		
 		secondBattle()
-	elseif checkPointReached == 4 then
+	elseif checkPointReached == 4 or checkPointReached == 5 then
 		ShowMission(campaignName, missionName, loc("The part is hidden in one of the crates! Go and get it!"), -amSkip, 0)
 		loadHeroAmmo()
 	end
@@ -361,7 +363,6 @@
 end
 
 function heroAtFirstBattle(gear)
-	WriteLnToConsole("**HERO AT FIRST BATTLE")
 	AnimCaption(hero.gear, loc("A smuggler! Prepare for battle"), 5000)
 	TurnTimeLeft = 0
 	heroIsInBattle = true
@@ -371,7 +372,6 @@
 end
 
 function heroFleeFirstBattle(gear)
-	WriteLnToConsole("++HERO FLEE FIRST BATTLE")
 	AnimSay(smuggler1.gear, loc("Run away you coward!"), SAY_SHOUT, 4000)
 	TurnTimeLeft = 0
 	heroIsInBattle = false
@@ -398,12 +398,18 @@
 	TurnTimeLeft = 0
 end
 
+-- for some weird reson I couldn't call the same action for both events
 function checkForWin1(gear)
 	checkForWin()
 end
 
 function checkForWin2(gear)
-	checkForWin()
+	-- ok lets place one more checkpoint as next part seems challenging without rope
+	if cratesFound ==  0 then
+		saveCheckPoint("5")
+	end
+	
+	checkForWin()	
 end
 
 -------------- ANIMATIONS ------------------