mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r1777) Fix map generation for tropical and arctic landscape on larger/smaller maps
This commit is contained in:
parent
1938a73c90
commit
0601293edb
36
landscape.c
36
landscape.c
|
@ -533,22 +533,26 @@ static void GenerateTerrain(int type, int flag)
|
||||||
p += 8;
|
p += 8;
|
||||||
|
|
||||||
if (flag & 4) {
|
if (flag & 4) {
|
||||||
if (!(flag & 2)) {
|
uint xw = x * MapSizeY();
|
||||||
if (!(flag & 1)) {
|
uint yw = y * MapSizeX();
|
||||||
if (x + y > 190)
|
uint bias = (MapSizeX() + MapSizeY()) * 16;
|
||||||
return;
|
|
||||||
} else {
|
switch (flag & 3) {
|
||||||
if (y < 30 + x)
|
case 0:
|
||||||
return;
|
if (xw + yw > MapSize() - bias) return;
|
||||||
}
|
break;
|
||||||
} else {
|
|
||||||
if (!(flag & 1)) {
|
case 1:
|
||||||
if (x + y < 256)
|
if (yw < xw + bias) return;
|
||||||
return;
|
break;
|
||||||
} else {
|
|
||||||
if (x < 30 + y)
|
case 2:
|
||||||
return;
|
if (xw + yw < MapSize() + bias) return;
|
||||||
}
|
break;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
if (xw < yw + bias) return;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue