changeset 10502 | a888e649bea2 |
parent 10499 | 0d8016085108 |
child 10510 | 9329dab04490 |
--- a/hedgewars/uLandGenTemplateBased.pas Sat Nov 15 09:43:21 2014 -0500 +++ b/hedgewars/uLandGenTemplateBased.pas Sat Nov 15 22:19:38 2014 +0300 @@ -149,7 +149,7 @@ if t1 > 0 then distL:= d else distR:= d; // right border - iy:= (rightX - mapBorderMargin - mp.x) * b div a + mp.y; + iy:= (LongInt(rightX) - mapBorderMargin - mp.x) * b div a + mp.y; d:= DistanceI(mp.x - rightX + mapBorderMargin, mp.y - iy).Round; if t1 > 0 then distR:= d else distL:= d; end else