hedgewars/uTeams.pas
changeset 13797 c084bd440009
parent 13763 6fd56a26e8b8
child 13811 3fa9e30927f1
--- a/hedgewars/uTeams.pas	Sun Sep 09 12:25:23 2018 +0200
+++ b/hedgewars/uTeams.pas	Tue Sep 11 16:00:23 2018 +0200
@@ -58,6 +58,7 @@
     s, cap: ansistring;
     ts: array[0..(cMaxTeams - 1)] of ansistring;
     t, AliveCount, i, j: LongInt;
+    allWin: boolean;
 begin
 CheckForWin:= false;
 AliveCount:= 0;
@@ -98,6 +99,7 @@
         end
     else // win
         begin
+        allWin:= false;
         with AliveClan^ do
             begin
             if TeamsNumber = 1 then // single team wins
@@ -118,8 +120,11 @@
 
                 // Write victory message for caption and stats page
                 if (TeamsNumber = cMaxTeams) or (TeamsCount = TeamsNumber) then
+                    begin
                     // No enemies for some reason … Everyone wins!!1!
-                    s:= trmsg[sidWinnerAll]
+                    s:= trmsg[sidWinnerAll];
+                    allWin:= true;
+                    end
                 else if (TeamsNumber >= 2) and (TeamsNumber < cMaxTeams) then
                     // List all winning teams in a list
                     s:= FormatA(trmsg[TMsgStrId(Ord(sidWinner2) + (TeamsNumber - 2))], ts);
@@ -144,6 +149,8 @@
 
         if SendGameResultOn then
             SendStat(siGameResult, shortstring(s));
+        if allWin and SendAchievementsStatsOn then
+            SendStat(siEverAfter, '');
         AddGear(0, 0, gtATFinishGame, 0, _0, _0, 3000)
         end;
     SendStats;