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