Allow switching away from any weapon when during multishoot.
--- a/hedgewars/uGearsHedgehog.pas Fri Feb 22 23:24:20 2013 +0400
+++ b/hedgewars/uGearsHedgehog.pas Fri Feb 22 14:33:21 2013 -0500
@@ -53,7 +53,6 @@
prevAmmo:= CurAmmoType;
ammoidx:= 0;
if ((HHGear^.State and (gstAttacking or gstAttacked)) <> 0)
- or ((MultiShootAttacks > 0) and ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NoRoundEnd) = 0))
or ((HHGear^.State and gstHHDriven) = 0) then
exit;
ChangeAmmo:= true;
@@ -61,8 +60,12 @@
while (ammoidx < cMaxSlotAmmoIndex) and (Ammo^[slot, ammoidx].AmmoType <> CurAmmoType) do
inc(ammoidx);
- if ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NoRoundEnd) <> 0) and (MultiShootAttacks > 0) then
- OnUsedAmmo(HHGear^.Hedgehog^);
+ if (MultiShootAttacks > 0) then
+ begin
+ if (CurAmmoType = amSniperRifle) and ((GameFlags and gfArtillery) = 0) then
+ cArtillery := false;
+ OnUsedAmmo(HHGear^.Hedgehog^)
+ end;
MultiShootAttacks:= 0;
HHGear^.Message:= HHGear^.Message and (not (gmLJump or gmHJump));