mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 05:52:59 +00:00 
			
		
		
		
	in getNewLand, do not freeze if no land is valid
This commit is contained in:
		| @@ -631,11 +631,13 @@ EX eLand getNewLand(eLand old) { | |||||||
|  |  | ||||||
|   if(ls::horodisk_structure() && tortoise::seek()) LIKELY tab[cnt++] = laTortoise; |   if(ls::horodisk_structure() && tortoise::seek()) LIKELY tab[cnt++] = laTortoise; | ||||||
|    |    | ||||||
|  |   int attempts = 0; | ||||||
|   eLand n = old; |   eLand n = old; | ||||||
|   while(incompatible(n, old) || !isLandIngame(n)) { |   while(incompatible(n, old) || !isLandIngame(n)) { | ||||||
|     n = tab[hrand(cnt)]; |     n = tab[hrand(cnt)]; | ||||||
|     if(weirdhyperbolic && specialland == laCrossroads4 && isCrossroads(n)) |     if(weirdhyperbolic && specialland == laCrossroads4 && isCrossroads(n)) | ||||||
|       n = laCrossroads4; |       n = laCrossroads4; | ||||||
|  |     attempts++; if(attempts == 2000) break; | ||||||
|     } |     } | ||||||
|    |    | ||||||
|   return n;   |   return n;   | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue