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
--- 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