hedgewars/uGearsHedgehog.pas
changeset 15022 9a7a5833fad2
parent 14996 7ff86274114e
child 15043 35932896ce84
equal deleted inserted replaced
15021:62e3853fa2ed 15022:9a7a5833fad2
   144 
   144 
   145 weap:= TAmmoType(HHGear^.MsgParam);
   145 weap:= TAmmoType(HHGear^.MsgParam);
   146 Hedgehog:= HHGear^.Hedgehog;
   146 Hedgehog:= HHGear^.Hedgehog;
   147 
   147 
   148 HHGear^.Message:= HHGear^.Message and (not gmWeapon);
   148 HHGear^.Message:= HHGear^.Message and (not gmWeapon);
   149 
       
   150 // Special case: amNothing unselects weapon
       
   151 if weap = amNothing then
       
   152     begin
       
   153     HHGear^.Hedgehog^.CurAmmoType:= amNothing;
       
   154     ApplyAmmoChanges(HHGear^.Hedgehog^);
       
   155     exit
       
   156     end;
       
   157 
   149 
   158 if Hedgehog^.Team^.Clan^.TurnNumber <= Ammoz[weap].SkipTurns then
   150 if Hedgehog^.Team^.Clan^.TurnNumber <= Ammoz[weap].SkipTurns then
   159     exit; // weapon is not activated yet
   151     exit; // weapon is not activated yet
   160 
   152 
   161 HHGear^.MsgParam:= Ammoz[weap].Slot;
   153 HHGear^.MsgParam:= Ammoz[weap].Slot;