should fix deadlock checkpoint reported by Wuzzy spacecampaign
authorPeriklis Ntanasis <pntanasis@gmail.com>
Fri, 13 Sep 2013 02:43:55 +0300
branchspacecampaign
changeset 9621 0e633b929825
parent 9620 55c82fd210cb
child 9622 db9f6b7955ba
should fix deadlock checkpoint reported by Wuzzy
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua	Fri Sep 13 02:22:57 2013 +0300
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua	Fri Sep 13 02:43:55 2013 +0300
@@ -376,12 +376,16 @@
 end
 
 function heroAtCheckpoint2(gear)
-	saveCheckPointLocal("2")
+	if GetAmmoCount(hero.gear, amRope) > 0 or GetAmmoCount(hero.gear, amParachute) > 0 then
+		saveCheckPointLocal("2")
+	end
 	secondBattle()
 end
 
 function heroAtCheckpoint3(gear)
-	saveCheckPointLocal("3")
+	if GetAmmoCount(hero.gear, amRope) > 0 then
+		saveCheckPointLocal("3")
+	end
 	secondBattle()
 end