ACF8: Fix mission panel being shown after victory (if the leader fled)
authorWuzzy <almikes@aol.com>
Thu, 28 Sep 2017 02:42:10 +0200
changeset 12570 0fb15ad40595
parent 12569 87326fec6ea2
child 12571 903a30fb49e6
ACF8: Fix mission panel being shown after victory (if the leader fled)
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/queen.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/queen.lua	Thu Sep 28 02:00:40 2017 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/queen.lua	Thu Sep 28 02:42:10 2017 +0200
@@ -539,12 +539,14 @@
 end
 
 function DoLeaderDead()
-  leaderDead = true
-  SetGearMessage(CurrentHedgehog, 0)
-  SetupLeaderDeadAnim()
-  AddAnim(leaderDeadAnim)
-  AddFunction({func = AfterLeaderDeadAnim, args = {}})
-  RemoveEventFunc(CheckTurnsOver)
+  if enemyFled ~= "1" then
+    leaderDead = true
+    SetGearMessage(CurrentHedgehog, 0)
+    SetupLeaderDeadAnim()
+    AddAnim(leaderDeadAnim)
+    AddFunction({func = AfterLeaderDeadAnim, args = {}})
+    RemoveEventFunc(CheckTurnsOver)
+  end
 end
 
 function CheckGearsDead(gearList)