# HG changeset patch # User Wuzzy # Date 1507134842 -7200 # Node ID 59b46e6f36fffaf496e40e25f92dc9d970bd21f2 # Parent 5bc6fb5da42f1deac65cf0f0a03fb80d1c4c22c7 Fix Birdy descending into water if hog took damage before it got picked up (bug 160) diff -r 5bc6fb5da42f -r 59b46e6f36ff ChangeLog.txt --- a/ChangeLog.txt Wed Oct 04 16:09:28 2017 +0200 +++ b/ChangeLog.txt Wed Oct 04 18:34:02 2017 +0200 @@ -46,6 +46,7 @@ * Fixed hedgehogs not saying “Stupid” and not displaying announcer message for inflicting self-harm * Fixed incorrect time box tooltip when in Sudden Death * Fixed cake taking over 200 seconds to explode when its stuck and can't move + * Fixed Birdy descending into water when hog took damage or died before it got picked up * Remove buggy /finish chat command * Various other fixes diff -r 5bc6fb5da42f -r 59b46e6f36ff hedgewars/uGearsHandlersMess.pas --- a/hedgewars/uGearsHandlersMess.pas Wed Oct 04 16:09:28 2017 +0200 +++ b/hedgewars/uGearsHandlersMess.pas Wed Oct 04 18:34:02 2017 +0200 @@ -4182,8 +4182,9 @@ dec(Gear^.Timer, 1); HHGear := Gear^.Hedgehog^.Gear; - if HHGear = nil then - begin + if (HHGear = nil) or ((HHGear^.State and gstHHDriven) = 0) then + begin + Gear^.Hedgehog := nil; Gear^.Timer := 0; Gear^.State := Gear^.State or gstAnimation or gstTmpFlag; Gear^.Timer := 0;