# HG changeset patch
# User Wuzzy <almikes@aol.com>
# Date 1493166493 -7200
# Node ID 0bc8c5fcd08cae430265c0f90a659c858609df9e
# Parent  6bdabf67a01282e28608ac252355acc39a0d6fd4
Use the traditional winning sequence in Space Invasion again (killing off the losers)

diff -r 6bdabf67a012 -r 0bc8c5fcd08c share/hedgewars/Data/Scripts/Multiplayer/Space_Invasion.lua
--- a/share/hedgewars/Data/Scripts/Multiplayer/Space_Invasion.lua	Wed Apr 26 02:10:47 2017 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Space_Invasion.lua	Wed Apr 26 02:28:13 2017 +0200
@@ -740,20 +740,21 @@
 		statusText = loc("Status Update")
 		scoreText = loc("Team scores:")
 	end
+	local displayTime
+	if roundNumber >= roundLimit then
+		displayTime = 20000
+	else
+		displayTime = 1
+	end
 	ShowMission(	loc("Space Invasion"),
 			statusText,
 			string.format(loc("Rounds complete: %d/%d"), roundNumber, roundLimit) .. "| " .. "|" ..
-			scoreText .. " |" ..entireC, 4, 1)
+			scoreText .. " |" ..entireC, 4, displayTime)
 
 	if roundNumber >= roundLimit then
 		local winnerTeam = teamStats[1].name
-		local victorySoundPlayed = false
 		for i = 0, (numhhs-1) do
 			if GetHogTeamName(hhs[i]) == winnerTeam then
-				if not victorySoundPlayer then
-					PlaySound(sndVictory, hhs[i])
-					victorySoundPlayed = true
-				end
 				SetState(hhs[i], bor(GetState(hhs[i]), gstWinner))
 			end
 		end
@@ -898,11 +899,19 @@
 			end
 		end
 
+		-- Kill off 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
+
+		-- Game over
 		gameOver = true
 		EndTurn(true)
 		TimeLeft = 0
 		SendStat(siGraphTitle, "Score graph")
-		EndGame()
 	end
 end
 
@@ -1228,6 +1237,9 @@
 end
 
 function onGameStart()
+	SendGameResultOff()
+	SendRankingStatsOff()
+	SendAchievementsStatsOff()
 	SendHealthStatsOff()
 
 	ShowMission	(