# HG changeset patch # User Wuzzy # Date 1540586797 -7200 # Node ID 996ef4c5d0640111dcb4eb4553728dc798dfbad9 # Parent ae11b53987dbc4539bc1b7236ccfffeeb12dc95b Fix seduction not stopping if hog took damage before attack was complete diff -r ae11b53987db -r 996ef4c5d064 ChangeLog.txt --- a/ChangeLog.txt Fri Oct 26 23:04:46 2018 +0300 +++ b/ChangeLog.txt Fri Oct 26 22:46:37 2018 +0200 @@ -32,6 +32,7 @@ * Fix projectiles behaving incorrectly with land just behind the wrap world edge * Fix bee weapon becoming unusable when hitting attack key in mid-air * Fix hog sometimes getting stuck in land if roping very fast + * Fix seduction not stopping if hog took damage before attack was complete * Limit hedgehog health to 268435455 to prevent some bugs Game, controls and commands: diff -r ae11b53987db -r 996ef4c5d064 hedgewars/uGearsHandlersMess.pas --- a/hedgewars/uGearsHandlersMess.pas Fri Oct 26 23:04:46 2018 +0300 +++ b/hedgewars/uGearsHandlersMess.pas Fri Oct 26 22:46:37 2018 +0200 @@ -3738,8 +3738,19 @@ procedure doStepSeductionWork(Gear: PGear); var i: LongInt; hogs: PGearArrayS; + HHGear: PGear; begin AllInactive := false; + + HHGear := Gear^.Hedgehog^.Gear; + if (HHGear <> nil) and ((HHGear^.State and gstHHDriven) = 0) then + begin + StopSound(sndYoohoo); + AfterAttack; + DeleteGear(Gear); + exit; + end; + hogs := GearsNear(Gear^.X, Gear^.Y, gtHedgehog, Gear^.Radius); if hogs.size > 0 then begin @@ -3759,8 +3770,9 @@ else if Hedgehog^.Effects[heFrozen] > 255 then Hedgehog^.Effects[heFrozen]:= 255 end ; - AfterAttack; - DeleteGear(Gear); + AfterAttack; + DeleteGear(Gear); + (* Gear^.X := Gear^.X + Gear^.dX; Gear^.Y := Gear^.Y + Gear^.dY; @@ -3788,8 +3800,19 @@ procedure doStepSeductionWear(Gear: PGear); var heart: PVisualGear; + HHGear: PGear; begin AllInactive := false; + + HHGear := Gear^.Hedgehog^.Gear; + if (HHGear <> nil) and ((HHGear^.State and gstHHDriven) = 0) then + begin + StopSound(sndYoohoo); + AfterAttack; + DeleteGear(Gear); + exit; + end; + inc(Gear^.Timer); if Gear^.Timer > 250 then begin