# HG changeset patch # User antonc27 # Date 1442206926 -7200 # Node ID e1a098f950a9eb4aa004fb0019969631d9ae6859 # Parent 9aad7f294864f4b64979ed17d95cee157a6c34a3 - Attempt to fix a crash while selecting 'Random' for map generation Note 1: It occurs in BezierizeEdge procedure of uLandOutline while generating land preview Note 2: Crash fixed, but most previews are not generated correctly, e.g. it's a case for bordered map. diff -r 9aad7f294864 -r e1a098f950a9 hedgewars/uLandGenTemplateBased.pas --- a/hedgewars/uLandGenTemplateBased.pas Sat Sep 12 05:46:59 2015 +0200 +++ b/hedgewars/uLandGenTemplateBased.pas Mon Sep 14 07:02:06 2015 +0200 @@ -9,7 +9,7 @@ var minDistance, dabDiv: LongInt; // different details size implementation -uses uVariables, uConsts, uFloat, uLandUtils, uRandom, SDLh, math; +uses uVariables, uTypes, uConsts, uFloat, uLandUtils, uRandom, SDLh, math; procedure SetPoints(var Template: TEdgeTemplate; var pa: TPixAr; fps: PPointArray); @@ -327,6 +327,9 @@ DivideEdges(Template.FillPointsCount, pa) until i = pa.Count; +{$IFDEF IPHONEOS} + if GameType <> gmtLandPreview then +{$ENDIF} // make it smooth BezierizeEdge(pa, _0_2); end;