- 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.
--- 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;