hedgewars/uGearsHandlersRope.pas
changeset 11532 bf86c6cb9341
parent 11266 31e0e38e703c
child 11589 c453620cc6d6
--- a/hedgewars/uGearsHandlersRope.pas	Sun Jan 24 00:02:57 2016 +0100
+++ b/hedgewars/uGearsHandlersRope.pas	Sun Jan 31 16:07:14 2016 +0300
@@ -270,7 +270,7 @@
             Gear^.X := Gear^.X + nx * len;
             Gear^.Y := Gear^.Y + ny * len;
             inc(RopePoints.Count);
-            TryDo(RopePoints.Count <= MAXROPEPOINTS, 'Rope points overflow', true);
+            if checkFails(RopePoints.Count <= MAXROPEPOINTS, 'Rope points overflow', true) then exit;
             Gear^.Elasticity := Gear^.Elasticity - len;
             Gear^.Friction := Gear^.Friction - len;
             haveDivided := true;