Fix for
bug #366, delete gear if hog is drowning (needed either that or a check on nil Gear^.Hedgehog^.Gear)
--- a/hedgewars/GSHandlers.inc Wed Feb 29 23:44:49 2012 +0400
+++ b/hedgewars/GSHandlers.inc Wed Feb 29 18:24:56 2012 -0500
@@ -1807,9 +1807,10 @@
State := State and (not gstAttacking);
Message := Message and (not gmAttack)
end;
- DeleteGear(Gear)
+ DeleteGear(Gear);
+ exit;
end;
- CheckGearDrowning(HHGear)
+ if CheckGearDrowning(HHGear) then DeleteGear(Gear)
end;
procedure doStepRope(Gear: PGear);