fix multi-shot related game ends leading to incomplete stats, fixes issue 372
authorsheepluva
Tue, 04 Sep 2012 12:34:00 +0200
changeset 7666 8212121cf6a1
parent 7665 e556b44f5bd8
child 7667 4346566c5a58
fix multi-shot related game ends leading to incomplete stats, fixes issue #372
hedgewars/uGears.pas
--- a/hedgewars/uGears.pas	Tue Sep 04 12:25:55 2012 +0400
+++ b/hedgewars/uGears.pas	Tue Sep 04 12:34:00 2012 +0200
@@ -284,7 +284,10 @@
             end;
     stChWin:
         begin
-        CheckForWin;
+        if CheckForWin() then
+            // if the game ends during a multishot, do last TurnReaction
+            if (not bBetweenTurns) and isInMultiShoot then
+                TurnReaction();
         inc(step)
         end;
     stWater: