ASA desert01: Fix third battle sometimes stopping instantly
authorWuzzy <Wuzzy2@mail.ru>
Wed, 16 Jan 2019 07:08:15 +0100
changeset 14614 e7bc81b303f3
parent 14613 bca306a47060
child 14615 de34abf040ed
ASA desert01: Fix third battle sometimes stopping instantly
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua	Wed Jan 16 06:56:38 2019 +0100
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua	Wed Jan 16 07:08:15 2019 +0100
@@ -322,7 +322,8 @@
 end
 
 function onHeroFleeFirstBattle(gear)
-	if GetHealth(hero.gear) and GetHealth(smuggler1.gear) and heroIsInBattle
+	if GetHealth(hero.gear) and GetHealth(smuggler1.gear)
+			and heroIsInBattle and ongoingBattle == 1
 			and not gearIsInCircle(smuggler1.gear, GetX(hero.gear), GetY(hero.gear), 1400, false)
 			and StoppedGear(hero.gear) then
 		return true