# HG changeset patch # User nemo # Date 1376367131 14400 # Node ID dca86192d7738cd4e225731cefe89242f1b0a2a8 # Parent 92e3fb58e1e173c96d4551233b0900d7cbef4580 I'm guessing this takes care of issue #689 diff -r 92e3fb58e1e1 -r dca86192d773 hedgewars/uGearsHandlersMess.pas --- a/hedgewars/uGearsHandlersMess.pas Fri Aug 02 00:06:44 2013 +0200 +++ b/hedgewars/uGearsHandlersMess.pas Tue Aug 13 00:12:11 2013 -0400 @@ -1432,6 +1432,13 @@ if ((GameFlags and gfInfAttack) <> 0) and (TurnTimeLeft > 0) then dec(TurnTimeLeft); + if Gear^.Hedgehog^.Gear = nil then + begin + DeleteGear(Gear); + AfterAttack; + exit + end; + HHGear := Gear^.Hedgehog^.Gear; HedgehogChAngle(HHGear); @@ -1493,13 +1500,13 @@ end; if b then - begin + begin DrawTunnel(HHGear^.X + Gear^.dX * cHHRadius, HHGear^.Y + Gear^.dY * cHHRadius - _1 - ((hwAbs(Gear^.dX) / (hwAbs(Gear^.dX) + hwAbs(Gear^.dY))) * _0_5 * 7), Gear^.dX, Gear^.dY, cHHStepTicks, cHHRadius * 2 + 7); - end; + end; if (TurnTimeLeft = 0) or (Gear^.Timer = 0) or ((HHGear^.Message and gmAttack) <> 0) then