share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/final.lua
changeset 15086 3a561db2a71c
parent 15072 d59da429d22c
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/final.lua	Wed May 29 13:21:23 2019 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/final.lua	Fri May 31 11:10:01 2019 +0200
@@ -136,17 +136,18 @@
 end
 
 function onBoom(gear)
-	local win = true
+	if (not IsHogAlive(gear)) or (not StoppedGear(gear)) then
+		return false
+	end
 	for i=1,table.getn(explosives) do
 		if GetHealth(explosives[i]) then
-			win = false
-			break
+			return false
 		end
 	end
 	if currentHealth <= currentDamage then
-		win = false
+		return false
 	end
-	return win
+	return true
 end
 
 -------------- ACTIONS ------------------