mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 14:02:59 +00:00 
			
		
		
		
	fixed a freeze when computing distance in INVERSE
This commit is contained in:
		
							
								
								
									
										7
									
								
								cell.cpp
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								cell.cpp
									
									
									
									
									
								
							| @@ -1469,14 +1469,15 @@ EX int celldistance(cell *c1, cell *c2) { | |||||||
|   if(hyperbolic && WDIM == 3) return reg3::celldistance(c1, c2); |   if(hyperbolic && WDIM == 3) return reg3::celldistance(c1, c2); | ||||||
|   #endif |   #endif | ||||||
|  |  | ||||||
|   if(INVERSE) { |   /* if(INVERSE) { | ||||||
|     c1 = gp::get_mapped(c1); |     c1 = gp::get_mapped(c1); | ||||||
|     c2 = gp::get_mapped(c2); |     c2 = gp::get_mapped(c2); | ||||||
|     return UIU(celldistance(c1, c2)) / 2; |     return UIU(celldistance(c1, c2)) / 2; | ||||||
|     /* TODO */ |     // that does not seem to work | ||||||
|     } |     } */ | ||||||
|  |  | ||||||
|   if(euclid) return clueless_celldistance(c1, c2); |   if(euclid) return clueless_celldistance(c1, c2); | ||||||
|  |   if(INVERSE) return clueless_celldistance(c1, c2); | ||||||
|  |  | ||||||
|   return hyperbolic_celldistance(c1, c2); |   return hyperbolic_celldistance(c1, c2); | ||||||
|   } |   } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue