share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua
branchspacecampaign
changeset 9617 662956a081a0
parent 9611 ef374528a9fb
child 9618 c937b532f8ec
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua	Thu Sep 12 18:26:06 2013 +0300
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua	Thu Sep 12 23:02:14 2013 +0300
@@ -295,14 +295,15 @@
 end
 
 function onNoFuelAtLand(gear)
-	if GetHealth(hero.gear) and GetY(gear) > 1400 and GetAmmoCount(gear, amJetpack) == 0 and StoppedGear(gear) then
+	if checkPointReached > 1 and GetHealth(hero.gear) and GetY(gear) > 1400 and 
+			GetAmmoCount(gear, amJetpack) == 0 and StoppedGear(gear) then
 		return true
 	end
 	return false
 end
 
 function onHeroDeath(gear)
-	if not GetHealth(gear) then
+	if not GetHealth(hero.gear) then
 		return true
 	end
 	return false
@@ -319,6 +320,7 @@
 	TurnTimeLeft = 0
 	-- save check point	
 	SaveCampaignVar("CosmosCheckPoint", "2")
+	checkPointReached = 2
 	AddAnim(dialog02)
 	-- check if he was spotted by the guard
 	if guard1.turn then