hedgewars/hwengine.pas
branchqmlfrontend
changeset 10606 8e95911cb86b
parent 10515 7705784902e1
parent 10581 f0b4c14a3c62
child 10748 dc587913987c
--- a/hedgewars/hwengine.pas	Sat Nov 22 00:55:01 2014 +0300
+++ b/hedgewars/hwengine.pas	Wed Dec 03 00:07:33 2014 +0300
@@ -44,6 +44,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 function DoTimer(Lag: LongInt): boolean;
 var s: shortstring;
+    t: LongWord;
 begin
     DoTimer:= false;
     inc(RealTicks, Lag);
@@ -79,6 +80,10 @@
             PlayMusic;
             InitZoom(zoom);
             ScriptCall('onGameStart');
+            for t:= 0 to Pred(TeamsCount) do
+                with TeamsArray[t]^ do
+                    MaxTeamHealth:= TeamHealth;
+            RecountAllTeamsHealth;
             GameState:= gsGame;
             end;
         gsConfirm, gsGame, gsChat: