ASA desert02: Fix mines not working in 1st turn when watching full cut scene
authorWuzzy <Wuzzy2@mail.ru>
Thu, 16 May 2019 23:04:19 +0200
changeset 15001 f359d8f86501
parent 15000 4406994969c3
child 15002 1a2dcea1732a
ASA desert02: Fix mines not working in 1st turn when watching full cut scene
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert02.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert02.lua	Thu May 16 22:07:06 2019 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert02.lua	Thu May 16 23:04:19 2019 +0200
@@ -22,6 +22,7 @@
 local cratesCollected = 0
 local totalCrates = 0
 local damageTaken = false
+local animStarted = false
 local record
 -- health crates
 healthX = 565
@@ -112,10 +113,13 @@
 	SpawnHealthCrate(healthX, health2Y)
 
 	SendHealthStatsOff()
-	AddAnim(dialog01)
 end
 
 function onNewTurn()
+	if not animStarted then
+		AddAnim(dialog01)
+		animStarted = true
+	end
 	SetWeapon(amRope)
 	if TotalRounds >= 0 and record ~= nil then
 		SetTeamLabel(teamA.name, tostring(TotalRounds))