disallow zero rope step
authoralfadur
Wed, 22 May 2019 23:53:00 +0300
changeset 15032 88e3d1ff67bb
parent 15031 a479916799ea
child 15036 8cde6fb2fabd
disallow zero rope step
hedgewars/uLandObjects.pas
--- a/hedgewars/uLandObjects.pas	Wed May 22 23:05:55 2019 +0300
+++ b/hedgewars/uLandObjects.pas	Wed May 22 23:53:00 2019 +0300
@@ -1061,7 +1061,7 @@
     else if key = 'snow' then
         cSnow:= true
     else if key = 'rope-step' then
-        cRopeNodeStep:= StrToInt(s)
+        cRopeNodeStep:= max(1, StrToInt(s))
     else if key = 'rope-layers' then
         cRopeLayers:= max(1, min(MAXROPELAYERS, StrToInt(s)))
     else if key = 'sd-water-top' then