hedgewars/uTeams.pas
changeset 3960 ada50f8d4186
parent 3935 5ca27a0e9a63
child 3966 cbec77b5f706
--- a/hedgewars/uTeams.pas	Mon Oct 11 11:36:47 2010 -0400
+++ b/hedgewars/uTeams.pas	Mon Oct 11 12:13:06 2010 -0400
@@ -231,6 +231,8 @@
 procedure AfterSwitchHedgehog;
 var g: PGear;
     i, t: LongInt;
+    CurWeapon: PAmmo;
+
 begin
 if PlacingHogs then
    begin
@@ -250,7 +252,8 @@
 
 inc(CurrentTeam^.Clan^.TurnNumber);
 
-SwitchNotHeldAmmo(CurrentHedgehog^);
+CurWeapon:= GetAmmoEntry(CurrentHedgehog^);
+if CurWeapon^.Count = 0 then CurrentHedgehog^.CurAmmoType:= amNothing;
 
 with CurrentHedgehog^ do
     begin