Restore freezing hedgehog for shotgun, sniper rifle and deagle to make unc0rr happy. You'll still be able to get away after throwing cleaver and sticky bomb tho.
authornemo
Fri, 22 Feb 2013 19:24:59 -0500
changeset 8562 d9d1cb650ff8
parent 8559 29e420194558
child 8564 dadfda4ba248
Restore freezing hedgehog for shotgun, sniper rifle and deagle to make unc0rr happy. You'll still be able to get away after throwing cleaver and sticky bomb tho.
hedgewars/uGears.pas
hedgewars/uGearsHedgehog.pas
--- a/hedgewars/uGears.pas	Fri Feb 22 23:59:52 2013 +0400
+++ b/hedgewars/uGears.pas	Fri Feb 22 19:24:59 2013 -0500
@@ -442,7 +442,8 @@
 
 if TurnTimeLeft > 0 then
     if CurrentHedgehog^.Gear <> nil then
-        if ((CurrentHedgehog^.Gear^.State and gstAttacking) = 0) then
+        if ((CurrentHedgehog^.Gear^.State and gstAttacking) = 0) and 
+            not(isInMultiShoot and (CurrentHedgehog^.CurAmmoType in [amShotgun, amDEagle, amSniperRifle])) then
                 begin
                 if (TurnTimeLeft = 5000)
                 and (cHedgehogTurnTime >= 10000)
--- a/hedgewars/uGearsHedgehog.pas	Fri Feb 22 23:59:52 2013 +0400
+++ b/hedgewars/uGearsHedgehog.pas	Fri Feb 22 19:24:59 2013 -0500
@@ -1001,20 +1001,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
@@ -1131,7 +1124,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);