Fix div by zero error in new generator
authorunc0rr
Wed, 19 Mar 2014 11:54:09 +0400
changeset 10204 50e52e511300
parent 10203 adeab6c21fe5
child 10205 fc99e124ba4d
Fix div by zero error in new generator
hedgewars/uLandGenTemplateBased.pas
--- a/hedgewars/uLandGenTemplateBased.pas	Wed Mar 19 00:34:14 2014 +0400
+++ b/hedgewars/uLandGenTemplateBased.pas	Wed Mar 19 11:54:09 2014 +0400
@@ -234,7 +234,7 @@
     if distL > d then distL:= d;
     if distR > d then distR:= d;
 
-    if distR + distL < minDistance * 2 then
+    if distR + distL < minDistance * 2 + 10 then
     begin
         // limits are too narrow, leave point alone
         newPoint:= p1