Use new turn ending method in moon02.lua
authorWuzzy <almikes@aol.com>
Thu, 21 Sep 2017 04:25:10 +0200
changeset 12467 de69155f976b
parent 12466 72c17eabc497
child 12468 d652c6f5d5f1
Use new turn ending method in moon02.lua
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon02.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon02.lua	Thu Sep 21 03:46:17 2017 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon02.lua	Thu Sep 21 04:25:10 2017 +0200
@@ -94,7 +94,7 @@
 function onNewTurn()
 	if startChallenge and currentPosition < 5 then
 		if CurrentHedgehog ~= hero.gear then
-			TurnTimeLeft = 0
+			EndTurn(true)
 		else
 			if GetAmmoCount(hero.gear, amRope) == 0  then
 				lose()
@@ -219,7 +219,7 @@
 			end
 		end
 
-		TurnTimeLeft = 0
+		EndTurn(true)
 	elseif currentPosition < 4 then
 		if not startChallenge then
 			startChallenge = true
@@ -236,7 +236,7 @@
 		currentPosition = currentPosition + 1
 		AddVisualGear(GetX(runner.gear), GetY(runner.gear), vgtExplosion, 0, false) 
 		SetGearPosition(runner.gear, runner.places[currentPosition].x, runner.places[currentPosition].y)
-		TurnTimeLeft = 0
+		EndTurn(true)
 	end
 end