Fix TotalRounds still being -1 in first real turn after hog placement phase
authorWuzzy <Wuzzy2@mail.ru>
Sat, 07 Jul 2018 23:29:02 +0200
changeset 13452 2d787d122083
parent 13451 7d69c5605a9d
child 13453 8f746b6a477c
Fix TotalRounds still being -1 in first real turn after hog placement phase Now it is: Hog placement phase: -1 First real round: 0 (previously -1) Second real round: 1 (previously 0) Third real round: 2 (previously 1) ...
ChangeLog.txt
hedgewars/uTeams.pas
--- a/ChangeLog.txt	Sat Jul 07 22:50:08 2018 +0200
+++ b/ChangeLog.txt	Sat Jul 07 23:29:02 2018 +0200
@@ -33,6 +33,7 @@
  + New call: GetAmmoTimer(gearUid, ammoType): Returns current set timer for given ammoType and hog gear in ms. Returns nil for non-timerable ammo
  + New call: EnableSwitchHog(): Enable hog switching
  + New parameter: SetAmmoTexts: 5th param. showExtra: Set to false to hide texts like “Not yet available”
+ * Fixed variable: TotalRounds was -1 (instead of 0) in first real round after hog placement phase
 
 ====================== 0.9.24.1 ====================
  * Fix crash when portable portal device is fired at reduced graphics quality
--- a/hedgewars/uTeams.pas	Sat Jul 07 22:50:08 2018 +0200
+++ b/hedgewars/uTeams.pas	Sat Jul 07 23:29:02 2018 +0200
@@ -287,7 +287,8 @@
         for i:= 0 to ClansCount do
             if ClansArray[i] <> nil then
                 ClansArray[i]^.TurnNumber:= 0;
-        ResetWeapons
+        ResetWeapons;
+        inc(TotalRounds)
         end
     end;