gfSwitchHog+gfKing: Fix hog switching being delayed one round too many
authorWuzzy <Wuzzy2@mail.ru>
Sat, 17 Aug 2019 01:06:13 +0200
changeset 15359 63372e3879df
parent 15357 f53bfe04065e
child 15360 cf4a9632e649
gfSwitchHog+gfKing: Fix hog switching being delayed one round too many
hedgewars/uTeams.pas
--- a/hedgewars/uTeams.pas	Fri Aug 16 20:46:10 2019 +0300
+++ b/hedgewars/uTeams.pas	Sat Aug 17 01:06:13 2019 +0200
@@ -453,7 +453,7 @@
     if ((GameFlags and gfSwitchHog) <> 0) and (not CurrentTeam^.hasGone) and
             // Exception: During the special "Place your King" round in King Mode;
             // you're not supposed to switch away from your king in this round.
-            (not (((GameFlags and gfKing) <> 0) and ((GameFlags and gfPlaceHog) = 0) and (TotalRoundsReal <= 0))) then
+            (not (((GameFlags and gfKing) <> 0) and ((GameFlags and gfPlaceHog) = 0) and (TotalRoundsReal = -1))) then
         begin
         g:= AddGear(hwRound(CurrentHedgehog^.Gear^.X), hwRound(CurrentHedgehog^.Gear^.Y), gtSwitcher, 0, _0, _0, 0);
         CurAmmoGear:= g;