share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua
changeset 15521 e3bf91fbd3f8
parent 15102 3a561db2a71c
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua	Fri Nov 01 11:42:53 2019 +0100
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua	Fri Nov 01 12:42:31 2019 +0100
@@ -20,6 +20,7 @@
 local checkPointReached = 1 -- 1 is start of the game
 local afterDialog02 = false
 local gameOver = false
+local minionsDead = false
 -- dialogs
 local dialog01 = {}
 local dialog02 = {}
@@ -262,6 +263,9 @@
 			EndTurn(true)
 		end
 	end
+	if minionsDead and (not (professor.dead or GetHealth(professor.gear) == nil or GetHealth(professor.gear) == 0)) then
+		FollowGear(professor.gear)
+	end
 end
 
 function onPrecise()
@@ -444,9 +448,11 @@
 end
 
 function minionsDeath(gear)
+	minionsDead = true
 	if professor.dead or GetHealth(professor.gear) == nil or GetHealth(professor.gear) == 0 then return end
 	if gameOver then return end
 	if (not IsHogAlive(hero.gear)) or (not StoppedGear(hero.gear)) then return end
+	SetTeamPassive(teamC.name, false)
 	AddAnim(dialog05)
 end