hedgewars/uTeams.pas
changeset 3966 cbec77b5f706
parent 3952 d6412423da45
parent 3960 ada50f8d4186
child 3994 486da687d76a
equal deleted inserted replaced
3952:d6412423da45 3966:cbec77b5f706
   228 end;
   228 end;
   229 
   229 
   230 procedure AfterSwitchHedgehog;
   230 procedure AfterSwitchHedgehog;
   231 var g: PGear;
   231 var g: PGear;
   232     i, t: LongInt;
   232     i, t: LongInt;
       
   233     CurWeapon: PAmmo;
       
   234 
   233 begin
   235 begin
   234 if PlacingHogs then
   236 if PlacingHogs then
   235    begin
   237    begin
   236    PlacingHogs:= false;
   238    PlacingHogs:= false;
   237    for t:= 0 to Pred(TeamsCount) do
   239    for t:= 0 to Pred(TeamsCount) do
   247       end
   249       end
   248    end;
   250    end;
   249 
   251 
   250 inc(CurrentTeam^.Clan^.TurnNumber);
   252 inc(CurrentTeam^.Clan^.TurnNumber);
   251 
   253 
   252 SwitchNotHeldAmmo(CurrentHedgehog^);
   254 CurWeapon:= GetAmmoEntry(CurrentHedgehog^);
       
   255 if CurWeapon^.Count = 0 then CurrentHedgehog^.CurAmmoType:= amNothing;
   253 
   256 
   254 with CurrentHedgehog^ do
   257 with CurrentHedgehog^ do
   255     begin
   258     begin
   256     with Gear^ do
   259     with Gear^ do
   257         begin
   260         begin