hedgewars/uTeams.pas
changeset 3966 cbec77b5f706
parent 3952 d6412423da45
parent 3960 ada50f8d4186
child 3994 486da687d76a
--- a/hedgewars/uTeams.pas	Mon Oct 11 03:28:15 2010 +0200
+++ b/hedgewars/uTeams.pas	Mon Oct 11 21:45:25 2010 +0200
@@ -230,6 +230,8 @@
 procedure AfterSwitchHedgehog;
 var g: PGear;
     i, t: LongInt;
+    CurWeapon: PAmmo;
+
 begin
 if PlacingHogs then
    begin
@@ -249,7 +251,8 @@
 
 inc(CurrentTeam^.Clan^.TurnNumber);
 
-SwitchNotHeldAmmo(CurrentHedgehog^);
+CurWeapon:= GetAmmoEntry(CurrentHedgehog^);
+if CurWeapon^.Count = 0 then CurrentHedgehog^.CurAmmoType:= amNothing;
 
 with CurrentHedgehog^ do
     begin