# HG changeset patch # User Wuzzy # Date 1507755667 -7200 # Node ID cb6b70392459f89a99db3ea548b8b6f9136f393e # Parent 286afe0791171c6c26e60779db3fb6da55e17311 Keep rope/jetpack/parachute selected when destroyed and having secondary ammo selected Assumption: You rope with secondary ammo selected. You miss a shot, destroying the rope gear. Previous behaviour: Rope gets deselected and the secondary ammo gets selected, you can no longer rope. Very annoying, reason of many Shoppa fails! New behaviour: Rope stays selected, but selection of secondary ammo is cleared (because rope gear got destroyed). Makes much more sense overall. Analog for jetpack and parachute. diff -r 286afe079117 -r cb6b70392459 ChangeLog.txt --- a/ChangeLog.txt Wed Oct 11 20:16:00 2017 +0200 +++ b/ChangeLog.txt Wed Oct 11 23:01:07 2017 +0200 @@ -30,6 +30,7 @@ + Small visual effects enhancements + Briefly show theme and music authors in chat at start of game + A few new funny ticker messages (English) + + Keep rope / parachute / flying saucer selected when destroyed and secondary ammo selected * Fixed cursor often jumping back to screen center when putting target location while moving cursor * Fixed air-strikes drops being off-center * Gameplay fix: Hammer damage is now rounded down. This means it will cause NO DAMAGE to a hedgehog with less than 3 hp. diff -r 286afe079117 -r cb6b70392459 hedgewars/uGearsHandlersMess.pas --- a/hedgewars/uGearsHandlersMess.pas Wed Oct 11 20:16:00 2017 +0200 +++ b/hedgewars/uGearsHandlersMess.pas Wed Oct 11 23:01:07 2017 +0200 @@ -2616,6 +2616,8 @@ State := State or gstMoving; end; DeleteGear(Gear); + if (GetAmmoEntry(HHGear^.Hedgehog^, TAmmoType(amParachute))^.Count >= 1) and (HHGear^.Hedgehog^.CurAmmoType <> amParachute) then + SetWeapon(amParachute); isCursorVisible := false; ApplyAmmoChanges(HHGear^.Hedgehog^); exit @@ -4017,6 +4019,8 @@ State := State or gstMoving end; DeleteGear(Gear); + if (GetAmmoEntry(HHGear^.Hedgehog^, TAmmoType(amJetpack))^.Count >= 1) and (HHGear^.Hedgehog^.CurAmmoType <> amJetpack) then + SetWeapon(amJetpack); isCursorVisible := false; ApplyAmmoChanges(HHGear^.Hedgehog^); // if Gear^.Tex <> nil then FreeTexture(Gear^.Tex); diff -r 286afe079117 -r cb6b70392459 hedgewars/uGearsHandlersRope.pas --- a/hedgewars/uGearsHandlersRope.pas Wed Oct 11 20:16:00 2017 +0200 +++ b/hedgewars/uGearsHandlersRope.pas Wed Oct 11 23:01:07 2017 +0200 @@ -449,6 +449,8 @@ HHGear^.State := HHGear^.State and (not (gstAttacking or gstHHJumping or gstHHHJump)); HHGear^.Message := HHGear^.Message and (not gmAttack); DeleteGear(Gear); + if (GetAmmoEntry(HHGear^.Hedgehog^, amRope)^.Count >= 1) and (HHGear^.Hedgehog^.CurAmmoType <> amRope) then + SetWeapon(amRope); exit() end; @@ -541,6 +543,8 @@ Message := Message and (not gmAttack) end; DeleteGear(Gear); + if GetAmmoEntry(HHGear^.Hedgehog^, TAmmoType(amRope))^.Count >= 1 then + SetWeapon(amRope); exit; end; if CheckGearDrowning(HHGear) then DeleteGear(Gear)