ASA_cosmos: Fix game not ending when hero dies after being seen by Guards
authorWuzzy <Wuzzy2@mail.ru>
Sun, 11 Mar 2018 11:01:27 +0100
changeset 13167 9ec7d2fb9da7
parent 13166 aa7915ceb69f
child 13168 a4d257f4b3e0
ASA_cosmos: Fix game not ending when hero dies after being seen by Guards
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua	Sun Mar 11 10:50:02 2018 +0100
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua	Sun Mar 11 11:01:27 2018 +0100
@@ -309,9 +309,9 @@
 				TurnTimeLeft = -1
 			end
 		end
-	elseif CurrentHedgehog == director.gear or CurrentHedgehog == doctor.gear then
+	elseif not onHeroDeath() and CurrentHedgehog == director.gear or CurrentHedgehog == doctor.gear then
 		EndTurn(true)
-	elseif (CurrentHedgehog == guard1.gear or CurrentHedgehog == guard2.gear) and guard1.keepTurning then
+	elseif not onHeroDeath() and (CurrentHedgehog == guard1.gear or CurrentHedgehog == guard2.gear) and guard1.keepTurning then
 		EndTurn(true)
 	end