--- a/hedgewars/uGearsHedgehog.pas Tue Feb 26 20:26:49 2013 -0500
+++ b/hedgewars/uGearsHedgehog.pas Tue Feb 26 20:37:58 2013 -0500
@@ -54,7 +54,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;
@@ -62,8 +61,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));
@@ -459,7 +462,7 @@
if (CurAmmoGear <> nil)
and ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_AltUse) = 0){check for dropping ammo from rope} then
begin
- if CurAmmoType = amRope then Message:= Message or gmAttack;
+ if CurAmmoType in [amRope,amResurrector] then Message:= Message or gmAttack;
CurAmmoGear^.Message:= Message
end
else
@@ -1002,20 +1005,13 @@
Hedgehog: PHedgehog;
begin
Hedgehog:= HHGear^.Hedgehog;
-// Some weapons, deagle in particular, wouldn't play so nice in infinite attack mode if hogs were still moving. Most likely scenario
-// is trying to shoot them twice while rolling. This is mostly about not wasting ammo, but shouldn't apply to gears not using AmmoShove (portal
-// Should we rethink AmmoShove? Presumably we'd need a way of knowing if current gear had already attacked a gear
-if isInMultiShoot and not AllInactive and (Hedgehog^.CurAmmoType in [amShotgun, amDEagle, amSniperRifle]) then HHGear^.Message:= HHGear^.Message and not gmAttack;
-(*
-if isInMultiShoot then
- HHGear^.Message:= 0;
-*)
-
-(*if ((Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_Utility) <> 0) and isInMultiShoot then
- AllInactive:= true
-else if not isInMultiShoot then
- AllInactive:= false;*)
- AllInactive:= false;
+//if isInMultiShoot and not AllInactive and (Hedgehog^.CurAmmoType in [amShotgun, amDEagle, amSniperRifle]) then HHGear^.Message:= HHGear^.Message and not gmAttack;
+if isInMultiShoot and (Hedgehog^.CurAmmoType in [amShotgun, amDEagle, amSniperRifle]) then
+ begin
+ AllInactive:= true;
+ HHGear^.Message:= 0
+ end
+else AllInactive:= false;
if (TurnTimeLeft = 0) or (HHGear^.Damage > 0) then
begin
@@ -1132,7 +1128,7 @@
exit
end;
- if Hedgehog^.Gear <> nil then
+ if not(isInMultiShoot and (Hedgehog^.CurAmmoType in [amShotgun, amDEagle, amSniperRifle])) and (Hedgehog^.Gear <> nil) then
begin
if GHStepTicks > 0 then
dec(GHStepTicks);