1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-18 11:19:59 +00:00

ads-game:: no longer crashes if underlying is not-gNormal hyperbolic

This commit is contained in:
Zeno Rogue 2022-10-14 01:02:36 +02:00
parent 45141a9df0
commit 970c2acc96

View File

@ -108,6 +108,7 @@ int gen_budget;
void gen_terrain(cell *c, cellinfo& ci, int level = 0) {
if(level >= ci.mpd_terrain) return;
if(!hyperbolic) { println(hlog, "wrong geometry detected in gen_terrain!"); exit(1); }
if(ci.mpd_terrain > level + 1) gen_terrain(c, ci, level+1);
forCellCM(c1, c) gen_terrain(c1, ci_at[c1], level+1);
genstats[level]++;
@ -168,7 +169,7 @@ void gen_rocks(cell *c, cellinfo& ci, int radius) {
if(radius <= ci.rock_dist) return;
if(ci.rock_dist < radius - 1) gen_rocks(c, ci, radius-1);
forCellCM(c1, c) gen_rocks(c1, ci_at[c1], radius-1);
if(geometry != gNormal) { println(hlog, "wrong geometry detected in gen_rocks 1!"); exit(1); }
if(!hyperbolic) { println(hlog, "wrong geometry detected in gen_rocks 1!"); exit(1); }
if(radius == 0) {
int q = rpoisson(rock_density);