diff -r 5b23c42ef150 -r 0411e04cf12a hedgewars/uTeams.pas --- a/hedgewars/uTeams.pas Thu Sep 28 19:26:22 2017 +0200 +++ b/hedgewars/uTeams.pas Thu Sep 28 21:32:42 2017 +0200 @@ -87,6 +87,7 @@ AddGear(0, 0, gtATFinishGame, 0, _0, _0, 3000); end else // win + begin with AliveClan^ do begin ts:= ansistring(Teams[0]^.TeamName); @@ -94,12 +95,28 @@ begin s:= FormatA(trmsg[sidWinner], ts); cap:= FormatA(GetEventString(eidRoundWin), ts); + AddCaption(cap, cWhiteColor, capgrpGameState); end else // clan wins - // FIXME: Clan needs a different message begin - s:= FormatA(trmsg[sidWinner], ts); - cap:= FormatA(GetEventString(eidRoundWin), ts); + s:= ''; + for j:= 0 to Pred(TeamsNumber) do + begin + (* + Currently, the game result string is just the victory + string concatenated multiple times. This assumes that + sidWinner is a complete sentence. + This might not work well for some languages. + + FIXME/TODO: Add event strings for 2, 3, 4 and >4 teams winning. + This requires FormatA to work with multiple parameters. *) + ts:= Teams[j]^.TeamName; + s:= s + ' ' + FormatA(trmsg[sidWinner], ts); + + // FIXME: Show victory captions one-by-one, not all at once + cap:= FormatA(GetEventString(eidRoundWin), ts); + AddCaption(cap, cWhiteColor, capgrpGameState); + end; end; for j:= 0 to Pred(TeamsNumber) do @@ -112,12 +129,12 @@ AddVoice(sndFlawless, Teams[0]^.voicepack) else AddVoice(sndVictory, Teams[0]^.voicepack); + end; - AddCaption(cap, cWhiteColor, capgrpGameState); - if SendGameResultOn then - SendStat(siGameResult, shortstring(s)); - AddGear(0, 0, gtATFinishGame, 0, _0, _0, 3000) - end; + if SendGameResultOn then + SendStat(siGameResult, shortstring(s)); + AddGear(0, 0, gtATFinishGame, 0, _0, _0, 3000) + end; SendStats; end; TeamsGameOver:= true;