hedgewars/uTeams.pas
changeset 14372 ce7f9f7cd359
parent 14240 de21f6eb2366
child 14387 2ab312c47dc3
equal deleted inserted replaced
14371:31717e1436cd 14372:ce7f9f7cd359
   433         TurnTimeLeft:= cHedgehogTurnTime;
   433         TurnTimeLeft:= cHedgehogTurnTime;
   434         TagTurnTimeLeft:= 0;
   434         TagTurnTimeLeft:= 0;
   435         NextClan:= false;
   435         NextClan:= false;
   436         end;
   436         end;
   437 
   437 
   438     if ((GameFlags and gfSwitchHog) <> 0) and (not CurrentTeam^.hasGone) then
   438     // Enable switching mode when gfSwitchHog is active
       
   439     if ((GameFlags and gfSwitchHog) <> 0) and (not CurrentTeam^.hasGone) and
       
   440             // Exception: During the special "Place your King" round in King Mode;
       
   441             // you're not supposed to switch away from your king in this round.
       
   442             (not (((GameFlags and gfKing) <> 0) and ((GameFlags and gfPlaceHog) = 0) and (TotalRoundsReal <= 0))) then
   439         begin
   443         begin
   440         g:= AddGear(hwRound(CurrentHedgehog^.Gear^.X), hwRound(CurrentHedgehog^.Gear^.Y), gtSwitcher, 0, _0, _0, 0);
   444         g:= AddGear(hwRound(CurrentHedgehog^.Gear^.X), hwRound(CurrentHedgehog^.Gear^.Y), gtSwitcher, 0, _0, _0, 0);
   441         CurAmmoGear:= g;
   445         CurAmmoGear:= g;
   442         lastGearByUID:= g;
   446         lastGearByUID:= g;
   443         end
   447         end