mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-26 10:00:42 +00:00
fixed a crash setting landscape_div to 0
This commit is contained in:
parent
9aa15f96e1
commit
84666ade8c
@ -3337,6 +3337,7 @@ EX int config3 = addHook(hooks_configfile, 100, [] {
|
|||||||
"land size in landscape structure",
|
"land size in landscape structure",
|
||||||
"Each cell gets three coordinates, each of which change smoothly, using the same method as used for the generation of landscapes e.g. in Dragon Chasms. "
|
"Each cell gets three coordinates, each of which change smoothly, using the same method as used for the generation of landscapes e.g. in Dragon Chasms. "
|
||||||
"Then, we find a cell of the bitruncated cubic honeycomb at these cordinates, and this cell determines which land it is. The bigger the value, the larger the lands.", 'R')
|
"Then, we find a cell of the bitruncated cubic honeycomb at these cordinates, and this cell determines which land it is. The bigger the value, the larger the lands.", 'R')
|
||||||
|
->set_sets([] { dialog::bound_low(1); })
|
||||||
->set_reaction([] { if(game_active) { stop_game(); start_game(); } });
|
->set_reaction([] { if(game_active) { stop_game(); start_game(); } });
|
||||||
|
|
||||||
param_i(curse_percentage, "curse_percentage")->editable(0, 100, 1,
|
param_i(curse_percentage, "curse_percentage")->editable(0, 100, 1,
|
||||||
|
@ -2921,7 +2921,7 @@ EX void set_land_for_geometry(cell *c) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(land_structure == lsLandscape) {
|
if(land_structure == lsLandscape) {
|
||||||
if(landscape_div < 0) landscape_div = 1;
|
if(landscape_div <= 0) landscape_div = 1;
|
||||||
array<int, 3> a;
|
array<int, 3> a;
|
||||||
for(int i=0; i<3; i++) a[i] = getCdata(c, i);
|
for(int i=0; i<3; i++) a[i] = getCdata(c, i);
|
||||||
auto& ld = landscape_div;
|
auto& ld = landscape_div;
|
||||||
|
Loading…
Reference in New Issue
Block a user