# HG changeset patch # User Wuzzy # Date 1509681827 -3600 # Node ID f3e07e53460d0cba29593514ba691edf3248da05 # Parent 4c1c468725ff9d37aae72a5c8b730197df0cdbbc Fix desyncs when forcing rope re-selection after missing a shot or hitting bounce world edge Also re-introduce rope-reselection when touching ground diff -r 4c1c468725ff -r f3e07e53460d hedgewars/uGearsHandlersRope.pas --- a/hedgewars/uGearsHandlersRope.pas Fri Nov 03 04:14:33 2017 +0100 +++ b/hedgewars/uGearsHandlersRope.pas Fri Nov 03 05:03:47 2017 +0100 @@ -66,6 +66,8 @@ or (TestCollisionYwithGear(HHGear, 1) <> 0) then begin DeleteGear(Gear); + if (TestCollisionYwithGear(HHGear, 1) <> 0) and (GetAmmoEntry(HHGear^.Hedgehog^, amRope)^.Count >= 1) and ((Ammoz[HHGear^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) then + HHGear^.Hedgehog^.CurAmmoType:= amRope; isCursorVisible := false; ApplyAmmoChanges(HHGear^.Hedgehog^); exit @@ -450,7 +452,9 @@ HHGear^.Message := HHGear^.Message and (not gmAttack); DeleteGear(Gear); if (GetAmmoEntry(HHGear^.Hedgehog^, amRope)^.Count >= 1) and ((Ammoz[HHGear^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) then - SetWeapon(amRope); + HHGear^.Hedgehog^.CurAmmoType:= amRope; + isCursorVisible := false; + ApplyAmmoChanges(HHGear^.Hedgehog^); exit() end; @@ -544,7 +548,9 @@ end; DeleteGear(Gear); if (GetAmmoEntry(HHGear^.Hedgehog^, amRope)^.Count >= 1) and ((Ammoz[HHGear^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) then - SetWeapon(amRope); + HHGear^.Hedgehog^.CurAmmoType:= amRope; + isCursorVisible := false; + ApplyAmmoChanges(HHGear^.Hedgehog^); exit; end; if CheckGearDrowning(HHGear) then DeleteGear(Gear)