Fix mines not working in first turn in ACF, mission 6 (
bug #180)
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/dragon.lua Mon Sep 25 15:34:07 2017 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/dragon.lua Mon Sep 25 16:07:31 2017 +0200
@@ -172,6 +172,7 @@
cratesNum = 0
jetCrate = nil
+firstTurn = true
cyborgsKilledBeforeCrates = false
cratesTaken = false
doneCyborgsDead = false
@@ -604,7 +605,7 @@
end
AddHogs()
- AnimInit()
+ AnimInit(true)
end
function onGameStart()
@@ -613,8 +614,6 @@
SetupPlace()
AnimationSetup()
SetupEvents()
- AddAnim(startAnim)
- AddFunction({func = AfterStartAnim, args = {}})
ShowMission(loc("Dragon's Lair"), loc("Y Chwiliad"), loc("Find your tribe!|Cross the lake!"), 1, 0)
end
@@ -646,9 +645,10 @@
end
function onNewTurn()
- if AnimInProgress() then
- TurnTimeLeft = -1
- return
+ if firstTurn then
+ AddAnim(startAnim)
+ AddFunction({func = AfterStartAnim, args = {}})
+ firstTurn = false
end
if GetHogTeamName(CurrentHedgehog) == loc("011101000") then
SetInputMask(band(0xFFFFFFFF, bnot(gmLeft + gmRight + gmLJump + gmHJump)))