# HG changeset patch # User Wuzzy # Date 1493165447 -7200 # Node ID 6bdabf67a01282e28608ac252355acc39a0d6fd4 # Parent 657a8d63c99d47537b10768f8b4f25897ea56c81 Add back the missing winning animation for Racer and TechRecer diff -r 657a8d63c99d -r 6bdabf67a012 share/hedgewars/Data/Scripts/Multiplayer/Racer.lua --- a/share/hedgewars/Data/Scripts/Multiplayer/Racer.lua Wed Apr 26 01:51:51 2017 +0200 +++ b/share/hedgewars/Data/Scripts/Multiplayer/Racer.lua Wed Apr 26 02:10:47 2017 +0200 @@ -434,9 +434,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 = {} @@ -473,8 +470,17 @@ SendStat(siCustomAchievement, loc("Maybe you should try easier waypoints next time.")) 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 @@ -548,7 +554,10 @@ function onGameStart() + SendGameResultOff() + SendRankingStatsOff() SendHealthStatsOff() + SendAchievementsStatsOff() roundN = 0 lastRound = TotalRounds diff -r 657a8d63c99d -r 6bdabf67a012 share/hedgewars/Data/Scripts/Multiplayer/TechRacer.lua --- 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()