Fix sniper rifle making timer gray all the time
authorWuzzy <almikes@aol.com>
Sun, 01 May 2016 01:04:45 +0200
changeset 11918 9da78300c5d0
parent 11917 d819c04d0cbe
child 11919 e0476802c8b5
Fix sniper rifle making timer gray all the time
hedgewars/uGears.pas
hedgewars/uGearsHandlersMess.pas
--- a/hedgewars/uGears.pas	Sun May 01 00:09:14 2016 +0200
+++ b/hedgewars/uGears.pas	Sun May 01 01:04:45 2016 +0200
@@ -1062,7 +1062,8 @@
     (CurrentHedgehog^.Gear <> nil)
     and (((CurrentHedgehog^.Gear^.State and gstAttacking) = 0)
     or (Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_DoesntStopTimerWhileAttacking <> 0)
-    or ((GameFlags and gfInfAttack) <> 0) and (Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_DoesntStopTimerWhileAttackingInInfAttackMode <> 0))
+    or ((GameFlags and gfInfAttack) <> 0) and (Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_DoesntStopTimerWhileAttackingInInfAttackMode <> 0)
+    or (CurrentHedgehog^.CurAmmoType = amSniperRifle))
     and (not(isInMultiShoot and ((Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_DoesntStopTimerInMultiShoot) <> 0)));
 end;
 
--- a/hedgewars/uGearsHandlersMess.pas	Sun May 01 00:09:14 2016 +0200
+++ b/hedgewars/uGearsHandlersMess.pas	Sun May 01 01:04:45 2016 +0200
@@ -1407,9 +1407,7 @@
         if (HHGear^.Angle >= 1) then
             dec(HHGear^.Angle);
 
-    if (TurnTimeLeft > 0) then
-        dec(TurnTimeLeft)
-    else
+    if (TurnTimeLeft = 0) then
         begin
         HHGear^.State := HHGear^.State and (not gstNotKickable);
         DeleteGear(Gear);