I didn't want to do this since it seems less clean, but...
authorsheepluva
Tue, 04 Sep 2012 13:18:26 +0200
changeset 7669 a85e1c167b69
parent 7668 4cb423f42105
child 7670 9485b88f6a44
I didn't want to do this since it seems less clean, but... moving the stats-fix into CheckForWin, since that function is the one sending the damage stats (whyyyy?) therefore it's not sufficient to update stats after calling it, some of the stats won't be transfered to frontend then
hedgewars/uGears.pas
hedgewars/uTeams.pas
--- a/hedgewars/uGears.pas	Tue Sep 04 15:18:22 2012 +0400
+++ b/hedgewars/uGears.pas	Tue Sep 04 13:18:26 2012 +0200
@@ -284,10 +284,7 @@
             end;
     stChWin:
         begin
-        if CheckForWin() then
-            // if the game ends during a multishot, do last TurnReaction
-            if (not bBetweenTurns) and isInMultiShoot then
-                TurnReaction();
+        CheckForWin();
         inc(step)
         end;
     stWater:
--- a/hedgewars/uTeams.pas	Tue Sep 04 15:18:22 2012 +0400
+++ b/hedgewars/uTeams.pas	Tue Sep 04 13:18:26 2012 +0200
@@ -64,6 +64,11 @@
 
 TurnTimeLeft:= 0;
 ReadyTimeLeft:= 0;
+
+// if the game ends during a multishot, do last TurnReaction
+if (not bBetweenTurns) and isInMultiShoot then
+    TurnReaction();
+
 if not GameOver then
     begin
     if AliveCount = 0 then