fix fade to black in training
authornemo
Wed, 06 Mar 2013 16:00:48 -0500
changeset 8679 a8bdcf7bec20
parent 8678 fb62d23c70f8
child 8680 5fe344cc8610
fix fade to black in training
hedgewars/GSHandlers.inc
share/hedgewars/Data/Missions/Training/Basic_Training_-_Bazooka.lua
share/hedgewars/Data/Missions/Training/Basic_Training_-_Cluster_Bomb.lua
share/hedgewars/Data/Missions/Training/Basic_Training_-_Shotgun.lua
share/hedgewars/Data/Missions/Training/Basic_Training_-_Sniper_Rifle.lua
--- a/hedgewars/GSHandlers.inc	Thu Mar 07 00:25:11 2013 +0400
+++ b/hedgewars/GSHandlers.inc	Wed Mar 06 16:00:48 2013 -0500
@@ -1153,15 +1153,15 @@
 dec(Gear^.Timer);
 case Gear^.Kind of
     gtATStartGame: 
-    begin
+        begin
         AllInactive := false;
         if Gear^.Timer = 0 then
             begin
             AddCaption(trmsg[sidStartFight], cWhiteColor, capgrpGameState);
             end
-    end;
+        end;
     gtATFinishGame: 
-    begin
+        begin
         AllInactive := false;
         if Gear^.Timer = 1000 then
             begin
@@ -1175,8 +1175,8 @@
             SendIPC(_S'q');
             GameState := gsExit
             end
+        end;
     end;
-end;
 if Gear^.Timer = 0 then
     DeleteGear(Gear)
 end;
--- a/share/hedgewars/Data/Missions/Training/Basic_Training_-_Bazooka.lua	Thu Mar 07 00:25:11 2013 +0400
+++ b/share/hedgewars/Data/Missions/Training/Basic_Training_-_Bazooka.lua	Wed Mar 06 16:00:48 2013 -0500
@@ -22,7 +22,7 @@
 -- This variable controls how many milliseconds/ticks we'd
 -- like to wait before we end the round once all targets
 -- have been destroyed.
-local end_timer = 5000 -- 5000 ms = 5 s
+local end_timer = 1000 -- 1000 ms = 1 s
 -- This variable is set to true if the game is lost (i.e.
 -- time runs out).
 local game_lost = false
@@ -140,11 +140,11 @@
 			-- ... end the game ...
 			EndGame()
 		else
-			-- ... or just lower the timer by 1.
-			end_timer = end_timer - 20
+			-- ... or just lower the timer by 20ms.
 			-- Reset the time left to stop the timer
 			TurnTimeLeft = time_goal
 		end
+        end_timer = end_timer - 20
 	end
 end
 
--- a/share/hedgewars/Data/Missions/Training/Basic_Training_-_Cluster_Bomb.lua	Thu Mar 07 00:25:11 2013 +0400
+++ b/share/hedgewars/Data/Missions/Training/Basic_Training_-_Cluster_Bomb.lua	Wed Mar 06 16:00:48 2013 -0500
@@ -2,7 +2,7 @@
 
 local player = nil
 local scored = 0
-local end_timer = 5000
+local end_timer = 1000
 local game_lost = false
 local time_goal = 0
 
@@ -76,9 +76,9 @@
 		if end_timer == 0 then
 			EndGame()
 		else
-			end_timer = end_timer - 20
 			TurnTimeLeft = time_goal
 		end
+        end_timer = end_timer - 20
 	end
 
 end
--- a/share/hedgewars/Data/Missions/Training/Basic_Training_-_Shotgun.lua	Thu Mar 07 00:25:11 2013 +0400
+++ b/share/hedgewars/Data/Missions/Training/Basic_Training_-_Shotgun.lua	Wed Mar 06 16:00:48 2013 -0500
@@ -22,7 +22,7 @@
 -- This variable controls how many milliseconds/ticks we'd
 -- like to wait before we end the round once all targets
 -- have been destroyed.
-local end_timer = 5000 -- 5000 ms = 5 s
+local end_timer = 1000 -- 1000 ms = 1 s
 -- This variable is set to true if the game is lost (i.e.
 -- time runs out).
 local game_lost = false
@@ -133,10 +133,10 @@
 			EndGame()
 		else
 			-- ... or just lower the timer by 1.
-			end_timer = end_timer - 20
 			-- Reset the time left to stop the timer
 			TurnTimeLeft = time_goal
 		end
+        end_timer = end_timer - 20
 	end
 end
 
--- a/share/hedgewars/Data/Missions/Training/Basic_Training_-_Sniper_Rifle.lua	Thu Mar 07 00:25:11 2013 +0400
+++ b/share/hedgewars/Data/Missions/Training/Basic_Training_-_Sniper_Rifle.lua	Wed Mar 06 16:00:48 2013 -0500
@@ -22,7 +22,7 @@
 -- This variable controls how many milliseconds/ticks we'd
 -- like to wait before we end the round once all targets
 -- have been destroyed.
-local end_timer = 5000 -- 5000 ms = 5 s
+local end_timer = 1000 -- 1000 ms = 1 s
 -- This variable is set to true if the game is lost (i.e.
 -- time runs out).
 local game_lost = false
@@ -145,10 +145,10 @@
 			EndGame()
 		else
 			-- ... or just lower the timer by 1.
-			end_timer = end_timer - 20
 			-- Reset the time left to stop the timer
 			TurnTimeLeft = time_goal
 		end
+        end_timer = end_timer - 20
 	end
 end