--- a/hedgewars/uAmmos.pas Tue Jul 03 22:44:50 2012 +0400
+++ b/hedgewars/uAmmos.pas Wed Jul 04 10:56:42 2012 -0400
@@ -32,6 +32,7 @@
procedure SetAmmoReinforcement(var s: shortstring);
procedure AssignStores;
procedure AddAmmo(var Hedgehog: THedgehog; ammo: TAmmoType);
+procedure AddAmmo(var Hedgehog: THedgehog; ammo: TAmmoType; amt: LongWord);
procedure SetAmmo(var Hedgehog: THedgehog; ammo: TAmmoType; cnt: LongWord);
function HHHasAmmo(var Hedgehog: THedgehog; Ammo: TAmmoType): LongWord;
procedure PackAmmo(Ammo: PHHAmmo; Slot: LongInt);
@@ -188,7 +189,7 @@
end
end;
-procedure AddAmmo(var Hedgehog: THedgehog; ammo: TAmmoType);
+procedure AddAmmo(var Hedgehog: THedgehog; ammo: TAmmoType; amt: LongWord);
var cnt: LongWord;
a: PAmmo;
begin
@@ -199,11 +200,16 @@
cnt:= 0;
if (cnt <> AMMO_INFINITE) then
begin
- inc(cnt, Ammoz[ammo].NumberInCase);
+ inc(cnt, amt);
SetAmmo(Hedgehog, ammo, cnt)
end
end;
+procedure AddAmmo(var Hedgehog: THedgehog; ammo: TAmmoType);
+begin
+ AddAmmo(Hedgehog, ammo, Ammoz[ammo].NumberInCase);
+end;
+
procedure SetAmmo(var Hedgehog: THedgehog; ammo: TAmmoType; cnt: LongWord);
var ammos: TAmmoCounts;
slot, ami: LongInt;