share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua
changeset 13736 c6154fcb9420
parent 13735 ae22928f2b01
child 13742 2bb7141496a9
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua	Sat Sep 01 21:47:08 2018 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua	Sat Sep 01 21:56:12 2018 +0200
@@ -270,11 +270,13 @@
 			-- Turn the other crate into a fake crate; this will “contain” the device.
 			SetGearPos(other_crate_table.gear, bor(GetGearPos(other_crate_table.gear), 0x8))
 		elseif cratesFound == 1 then
-			-- Second win crate collected:
-			-- This crate contains the anti-gravity part! VICTORY!
-			PlaySound(sndShotgunReload)
-			-- It's displayed as if collecting a normal ammo/utility crate. :-)
-			AddCaption(loc("Anti-Gravity Device Part (+1)"), GetClanColor(GetHogClan(CurrentHedgehog)), capgrpAmmoinfo)
+			if not candidate_crate_table.destroyed then
+				-- Second win crate collected:
+				-- This crate contains the anti-gravity part! VICTORY!
+				PlaySound(sndShotgunReload)
+				-- It's displayed as if collecting a normal ammo/utility crate. :-)
+				AddCaption(loc("Anti-Gravity Device Part (+1)"), GetClanColor(GetHogClan(CurrentHedgehog)), capgrpAmmoinfo)
+			end
 		end
 	end