ACF3: Fix princess-in-cage scene: Princess did not die
authorWuzzy <Wuzzy2@mail.ru>
Sat, 25 May 2019 02:14:25 +0200
changeset 15050 ce3efc9cc6d3
parent 15049 6fc8f0a2929d
child 15051 a9873c81b5e6
ACF3: Fix princess-in-cage scene: Princess did not die
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/journey.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/journey.lua	Sat May 25 01:45:46 2019 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/journey.lua	Sat May 25 02:14:25 2019 +0200
@@ -181,8 +181,6 @@
 
 --/////////////////////////Animation Functions///////////////////////
 function AfterMidFailAnim()
-  DismissTeam(nativesTeamName)
-  DismissTeam(princessTeamName)
   EndTurn(true)
 end
 
@@ -1019,7 +1017,7 @@
   if not cyborgDead then
     SwitchHog(cyborg)
   end
-  if not (leaksDead or denseDead) then
+  if (not (leaksDead or denseDead)) and (TurnsLeft > 0)  then
     AddAnim(endFailAnim)
   end
   AddFunction({func = DismissTeam, args = {nativesTeamName}})
@@ -1058,6 +1056,7 @@
   AnimWait(cyborg, 1)
   AddFunction({func = AddAnim, args = {failAnim}})
   AddFunction({func = AddFunction, args = {{func = AfterMidFailAnim, args = {}}}})
+  AddEvent(CheckLost, {}, DoLost, {})
 end
 
 function SkipFailAnimAlone()