hedgewars/uAmmos.pas
changeset 5136 948da1e50205
parent 5031 e26f430be1ed
child 5167 7b515d0945b1
equal deleted inserted replaced
5134:97827ad5c904 5136:948da1e50205
   226             dec(Count);
   226             dec(Count);
   227             if Count = 0 then
   227             if Count = 0 then
   228                 begin
   228                 begin
   229                 PackAmmo(Ammo, Ammoz[AmmoType].Slot);
   229                 PackAmmo(Ammo, Ammoz[AmmoType].Slot);
   230                 //SwitchNotHeldAmmo(Hedgehog);
   230                 //SwitchNotHeldAmmo(Hedgehog);
   231                 ShowCrossHair:= false;
       
   232                 CurAmmoType:= amNothing
   231                 CurAmmoType:= amNothing
   233                 end
   232                 end
   234             end
   233             end
   235     end;
   234     end;
   236 perfExt_AmmoUpdate;
   235 perfExt_AmmoUpdate;
   293             inc(slot)
   292             inc(slot)
   294             end
   293             end
   295         end;
   294         end;
   296     TryDo(slot <= cMaxSlotIndex, 'Ammo slot index overflow', true);
   295     TryDo(slot <= cMaxSlotIndex, 'Ammo slot index overflow', true);
   297     CurAmmoType:= Ammo^[slot, ammoidx].AmmoType;
   296     CurAmmoType:= Ammo^[slot, ammoidx].AmmoType;
   298     if (CurAmmoGear <> nil) and ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_AltAttack) <> 0) then
       
   299         ShowCrosshair:= (Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_NoCrossHair) = 0
       
   300     else
       
   301         ShowCrosshair:= (Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NoCrosshair) = 0;
       
   302     end
   297     end
   303 end;
   298 end;
   304 
   299 
   305 procedure ApplyAmmoChanges(var Hedgehog: THedgehog);
   300 procedure ApplyAmmoChanges(var Hedgehog: THedgehog);
   306 var s: shortstring;
   301 var s: shortstring;