fairland: Use zero elevation for "not yet elevated"
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
72f88eefd8
commit
b3d564c8ae
1 changed files with 3 additions and 9 deletions
|
@ -1256,12 +1256,6 @@ grow_islands(void)
|
|||
static void
|
||||
create_elevations(void)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
for (i = 0; i < WORLD_X; i++) {
|
||||
for (j = 0; j < WORLD_Y; j++)
|
||||
elev[i][j] = -INFINITE_ELEVATION;
|
||||
}
|
||||
init_distance_to_coast();
|
||||
elevate_land();
|
||||
elevate_sea();
|
||||
|
@ -1328,7 +1322,7 @@ elevate_land(void)
|
|||
for (i = 0; i < ns; ++i) {
|
||||
x = sectx[c][i];
|
||||
y = secty[c][i];
|
||||
if (r < weight[i] && elev[x][y] == -INFINITE_ELEVATION &&
|
||||
if (r < weight[i] && !elev[x][y] &&
|
||||
(c >= nc ||
|
||||
((!(capx[c] == sectx[c][i] &&
|
||||
capy[c] == secty[c][i])) &&
|
||||
|
@ -1354,7 +1348,7 @@ elevate_land(void)
|
|||
for (i = 0; i < ns; ++i) {
|
||||
x = sectx[c][i];
|
||||
y = secty[c][i];
|
||||
if (elev[x][y] == -INFINITE_ELEVATION &&
|
||||
if (!elev[x][y] &&
|
||||
(c >= nc || ((!(capx[c] == sectx[c][i] &&
|
||||
capy[c] == secty[c][i])) &&
|
||||
(!(new_x(capx[c] + 2) == sectx[c][i] &&
|
||||
|
@ -1405,7 +1399,7 @@ elevate_sea(void)
|
|||
for (y = 0; y < WORLD_Y; ++y) {
|
||||
for (x = y % 2; x < WORLD_X; x += 2) {
|
||||
off = XYOFFSET(x, y);
|
||||
if (elev[x][y] == -INFINITE_ELEVATION)
|
||||
if (own[x][y] == -1)
|
||||
elev[x][y] = -roll(MIN(5, distance[off]) * 20 + 27);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue