diff --git a/complex.cpp b/complex.cpp index c24f0456..9f0652fd 100644 --- a/complex.cpp +++ b/complex.cpp @@ -3662,6 +3662,8 @@ EX namespace windmap { } } + EX int wind_failed = 0; + EX void create() { if(disable_bigstuff) return; if(cgflags & qPORTALSPACE) return; @@ -3709,9 +3711,15 @@ EX namespace windmap { vector tocheck; for(int i=0; i= 200*N) { printf("does not converge\n"); break; } + if(a >= 200*N) { + println(hlog, "does not converge"); + wind_failed |= 1; + break; + } int bestval = 1000000000, best = 0; int i = tocheck[a]; for(int k=0; k<256; k++) { @@ -3740,8 +3748,10 @@ EX namespace windmap { if(tries < maxtries) goto tryagain; } if(debug_geometry) println(hlog, "windmap: tries = ", tries, " N = ", N); - if(tries >= maxtries && maxtries >= 20) { - addMessage("Failed to generate an interesting wind/lava pattern."); + if(tries >= maxtries) { + if(maxtries >= 20) + addMessage("Failed to generate an interesting wind/lava pattern."); + wind_failed |= 2; } else if(false) { printf("tocheck size = %d\n", isize(tocheck)); diff --git a/help.cpp b/help.cpp index 430b6efd..87a364f9 100644 --- a/help.cpp +++ b/help.cpp @@ -829,6 +829,9 @@ EX string generateHelpForLand(eLand l) { if(l == laWildWest) s += XLAT("Bonus land, available only in some special modes.\n"); + if(among(l, laBlizzard, laVolcano) && windmap::wind_failed) + s += XLAT("Failed to construct a wind/lava pattern. This land will not work correctly.\n"); + if(l == laWhirlpool) s += XLAT("Orbs of Safety always appear here, and may be used to escape.\n"); diff --git a/landlock.cpp b/landlock.cpp index 07ac349a..eaa7c7f9 100644 --- a/landlock.cpp +++ b/landlock.cpp @@ -846,6 +846,7 @@ EX bool isLandIngame(eLand l) { if((eubinary || sol) && isCyclic(l) && l != specialland) return false; if(l == laCamelot && hyperbolic && WDIM == 3) return false; if(!(land_validity(l).flags & lv::appears_in_full)) return false; + if(among(l, laBlizzard, laVolcano) && windmap::wind_failed) return false; return landAccessibleFromIngame(l); }