mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 05:52:59 +00:00 
			
		
		
		
	Check for having pruned all land candidates.
This commit is contained in:
		| @@ -675,7 +675,6 @@ EX eLand getNewLand(eLand old) { | ||||
|  | ||||
|   if(ls::horodisk_structure() && tortoise::seek()) LIKELY tab[cnt++] = laTortoise; | ||||
|    | ||||
|   printf("Before pruning: %d entries\n", cnt); | ||||
|   int idx = 0; | ||||
|   while (idx < cnt) { | ||||
|     eLand n = tab[idx]; | ||||
| @@ -684,14 +683,16 @@ EX eLand getNewLand(eLand old) { | ||||
|     else | ||||
|       idx++; | ||||
|     } | ||||
|   printf("After pruning: %d entries\n", cnt); | ||||
|  | ||||
|   if (!cnt) { | ||||
|     addMessage("No eligible land candidates!"); | ||||
|     return old; | ||||
|     } | ||||
|  | ||||
|   eLand n = tab[hrand(cnt)]; | ||||
|   if (weirdhyperbolic && specialland == laCrossroads4 && isCrossroads(n)) | ||||
|     n = laCrossroads4; | ||||
|  | ||||
|   //printf("Took %d attempts.\n", attempts); | ||||
|    | ||||
|   return n;   | ||||
|   } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Jacob Mandelson
					Jacob Mandelson