forked from github/server
parent
b09d0a89a7
commit
e89b1c908d
|
@ -51,9 +51,9 @@ random_terrain(unsigned int flags)
|
|||
}
|
||||
}
|
||||
n = rand() % nterrains;
|
||||
for (terrain=terrains();n;terrain=terrain->next) {
|
||||
for (terrain=terrains();terrain;terrain=terrain->next) {
|
||||
if (fval(terrain, flags)==flags) {
|
||||
--n;
|
||||
if (n--==0) break;
|
||||
}
|
||||
}
|
||||
return terrain;
|
||||
|
|
|
@ -955,9 +955,7 @@ select_terrain(const terrain_type * default_terrain)
|
|||
prev = ilist;
|
||||
|
||||
while (terrain) {
|
||||
insert_selection(iinsert, prev, terrain->_name, (void*)terrain);
|
||||
prev = *iinsert;
|
||||
iinsert = &prev->next;
|
||||
push_selection(iinsert, terrain->_name, (void*)terrain);
|
||||
terrain = terrain->next;
|
||||
}
|
||||
selected = do_selection(ilist, "Terrain", NULL, NULL);
|
||||
|
|
|
@ -1151,13 +1151,15 @@ movearound(short rx, short ry) {
|
|||
ch=-9;
|
||||
break;
|
||||
case 'I':
|
||||
a=map_input(0,0,0,"Wieviele Regionen?",0,500,0);
|
||||
if (r!=NULL) {
|
||||
a = map_input(0,0,0,"Wieviele Regionen?",0,500,0);
|
||||
if (a) {
|
||||
const terrain_type * terrain = random_terrain(NORMAL_TERRAIN);
|
||||
create_island(r, a, terrain);
|
||||
modified=1;
|
||||
}
|
||||
ch = -9;
|
||||
}
|
||||
break;
|
||||
case 0x2:
|
||||
make_ocean_block(rx, ry);
|
||||
|
|
Loading…
Reference in New Issue