Fix temporary hog/timer freeze when throwing sticky mine, then switch to shotgun in inf. attack
--- a/ChangeLog.txt Sun May 26 20:51:42 2019 +0200
+++ b/ChangeLog.txt Sun May 26 23:52:04 2019 +0200
@@ -31,6 +31,7 @@
* Deny placement of piano beyond bounce world edge
* Fix laser sight not working properly when it starts out of map bounds
* Fix parachute making hog stuck or fast when bumping into wall while looking other way
+ * Fix temporary hog/timer freeze when throwing sticky mine, then switch to shotgun in inf. attack
* Add missing winner animation in single missions
Styles and schemes:
--- a/hedgewars/uGears.pas Sun May 26 20:51:42 2019 +0200
+++ b/hedgewars/uGears.pas Sun May 26 23:52:04 2019 +0200
@@ -1265,7 +1265,7 @@
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 (CurrentHedgehog^.CurAmmoType = amSniperRifle))
- and (not(isInMultiShoot and ((Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_DoesntStopTimerInMultiShoot) <> 0)))
+ and (not(isInMultiShoot and ((Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_DoesntStopTimerInMultiShoot) <> 0) and ((GameFlags and gfInfAttack) = 0)))
and (not LuaClockPaused);
end;
--- a/hedgewars/uGearsHedgehog.pas Sun May 26 20:51:42 2019 +0200
+++ b/hedgewars/uGearsHedgehog.pas Sun May 26 23:52:04 2019 +0200
@@ -1296,7 +1296,7 @@
else if Hedgehog^.CurAmmoType in [amShotgun, amDEagle, amSniperRifle] then
HHGear^.Message:= HHGear^.Message and gmPrecise;
-if ((Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_Utility) <> 0) and isInMultiShoot then
+if (((GameFlags and gfInfAttack) <> 0) or ((Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_Utility) <> 0)) and isInMultiShoot then
AllInactive:= true
else if not isInMultiShoot then
AllInactive:= false;
@@ -1434,7 +1434,7 @@
exit
end;
- if not(isInMultiShoot and (Hedgehog^.CurAmmoType in [amShotgun, amDEagle, amSniperRifle])) and (Hedgehog^.Gear <> nil) then
+ if ((not (isInMultiShoot and (Hedgehog^.CurAmmoType in [amShotgun, amDEagle, amSniperRifle]) and ((GameFlags and gfInfAttack) = 0)))) and (Hedgehog^.Gear <> nil) then
begin
if GHStepTicks > 0 then
dec(GHStepTicks);