share/hedgewars/Data/Scripts/Multiplayer/TechRacer.lua
changeset 12333 6bdabf67a012
parent 12287 faf1b93422ba
child 12388 0eb1457f7b94
--- a/share/hedgewars/Data/Scripts/Multiplayer/TechRacer.lua	Wed Apr 26 01:51:51 2017 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/TechRacer.lua	Wed Apr 26 02:10:47 2017 +0200
@@ -460,9 +460,6 @@
 
         -- end game if its at round limit
         if roundNumber >= roundLimit then
-                gameOver = true
-                TurnTimeLeft = 10000000
-
                 -- Sort the scores for the ranking list
                 local unfinishedArray = {}
                 local sortedTeams = {}
@@ -498,8 +495,16 @@
                         SendStat(siCustomAchievement, loc("Maybe you should try an easier TechRacer map."))
                 end
 
-                -- Game over
-                EndGame()
+		-- Kill all the losers
+		for i = 0, (numhhs-1) do
+			if GetHogClan(hhs[i]) ~= bestClan then
+				SetEffect(hhs[i], heResurrectable, 0)
+				SetHealth(hhs[i],0)
+			end
+		end
+
+		gameOver = true
+		EndTurn(true)
         end
 
 end
@@ -956,6 +961,9 @@
 end
 
 function onGameStart()
+	SendGameResultOff()
+	SendRankingStatsOff()
+	SendAchievementsStatsOff()
 	SendHealthStatsOff()
 
 		trackTeams()