# HG changeset patch # User Wuzzy # Date 1563316435 -7200 # Node ID 4aa19b21707db8eb7514d12bfe7c60ccc611ddb2 # Parent 395563ffc8b51a83c22469801988b4c99269db11 Fix cursor not being disabled when teleporting hog into water diff -r 395563ffc8b5 -r 4aa19b21707d hedgewars/uAmmos.pas --- a/hedgewars/uAmmos.pas Mon Jul 15 23:26:00 2019 +0200 +++ b/hedgewars/uAmmos.pas Wed Jul 17 00:33:55 2019 +0200 @@ -404,7 +404,9 @@ CurWeapon:= GetCurAmmoEntry(Hedgehog); OldWeapon:= GetCurAmmoEntry(Hedgehog); - if (CurWeapon^.Count = 0) then + if (Hedgehog.Gear^.State and gstHHDriven) = 0 then + Hedgehog.CurAmmoType:= amNothing + else if (CurWeapon^.Count = 0) then SwitchToFirstLegalAmmo(Hedgehog) else if CurWeapon^.AmmoType = amNothing then Hedgehog.CurAmmoType:= amNothing; @@ -427,7 +429,8 @@ s:= s + ansistring(' (' + IntToStr(Count) + ')'); if (Propz and ammoprop_Timerable) <> 0 then s:= s + ansistring(', ' + IntToStr(Timer div 1000) + ' ') + trammo[sidSeconds]; - AddCaption(s, Team^.Clan^.Color, capgrpAmmoinfo); + if (Hedgehog.Gear^.State and gstHHDriven) <> 0 then + AddCaption(s, Team^.Clan^.Color, capgrpAmmoinfo); if (Propz and ammoprop_NeedTarget) <> 0 then begin if Gear <> nil then Gear^.State:= Gear^.State or gstChooseTarget; diff -r 395563ffc8b5 -r 4aa19b21707d hedgewars/uGearsHandlersMess.pas --- a/hedgewars/uGearsHandlersMess.pas Mon Jul 15 23:26:00 2019 +0200 +++ b/hedgewars/uGearsHandlersMess.pas Wed Jul 17 00:33:55 2019 +0200 @@ -3353,7 +3353,7 @@ or (HHGear = nil) or ((HHGear^.State and gstMoving) = 0) or (HHGear^.Damage > 0) - or ((HHGear^.State and gstDrowning) = 1) then + or ((HHGear^.State and gstDrowning) <> 0) then begin DeleteGear(Gear); AfterAttack