hedgewars/uTeams.pas
changeset 944 9299c0ebfdbc
parent 941 b5222ddafe1f
child 971 d2c49b730771
--- a/hedgewars/uTeams.pas	Wed May 21 20:22:51 2008 +0000
+++ b/hedgewars/uTeams.pas	Thu May 22 17:25:12 2008 +0000
@@ -140,13 +140,13 @@
 TargetPoint.X:= NoPointX;
 TryDo(CurrentTeam <> nil, 'nil Team', true);
 
-with CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog] do
+with CurrentHedgehog^ do
      if Gear <> nil then
         begin
         AttacksNum:= 0;
         Gear^.Message:= 0;
         Gear^.Z:= cHHZ;
-        SwitchNotHoldedAmmo(CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog]);
+        SwitchNotHoldedAmmo(CurrentHedgehog^);
         RemoveGearFromList(Gear);
         InsertGearToList(Gear)
         end;
@@ -170,6 +170,7 @@
 until CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog].Gear <> nil;
 
 CurrentHedgehog:= @(CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog]);
+SwitchNotHoldedAmmo(CurrentHedgehog^);
 with CurrentHedgehog^ do
      begin
      with Gear^ do