mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-30 21:42:59 +00:00 
			
		
		
		
	fixed some issues with 'cells_generated_limit'
This commit is contained in:
		| @@ -6514,6 +6514,7 @@ void drawthemap() { | |||||||
|  |  | ||||||
|   frameid++; |   frameid++; | ||||||
|   cells_drawn = 0; |   cells_drawn = 0; | ||||||
|  |   cells_generated = 0; | ||||||
|   noclipped = 0; |   noclipped = 0; | ||||||
|   first_cell_to_draw = true; |   first_cell_to_draw = true; | ||||||
|    |    | ||||||
|   | |||||||
							
								
								
									
										21
									
								
								hypgraph.cpp
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								hypgraph.cpp
									
									
									
									
									
								
							| @@ -1701,19 +1701,26 @@ bool do_draw(cell *c) { | |||||||
|  |  | ||||||
| ld extra_generation_distance = 99; | ld extra_generation_distance = 99; | ||||||
|  |  | ||||||
|  | // returns false if limited | ||||||
|  | bool limited_generation(cell *c) { | ||||||
|  |   if(c->mpdist <= 7) return true; | ||||||
|  |   if(cells_generated > vid.cells_generated_limit) return false; | ||||||
|  |   setdist(c, 7, c); | ||||||
|  |   cells_generated++; | ||||||
|  |   return true; | ||||||
|  |   } | ||||||
|  |  | ||||||
| bool do_draw(cell *c, const transmatrix& T) { | bool do_draw(cell *c, const transmatrix& T) { | ||||||
|   if(WDIM == 3) { |   if(WDIM == 3) { | ||||||
|     if(cells_drawn > vid.cells_drawn_limit) return false; |     if(cells_drawn > vid.cells_drawn_limit) return false; | ||||||
|     if(vid.use_smart_range) { |     if(vid.use_smart_range) { | ||||||
|       if(cells_drawn >= 50 && !in_smart_range(T)) return false; |       if(cells_drawn >= 50 && !in_smart_range(T)) return false; | ||||||
|       if(c->mpdist > 7 && cells_generated > vid.cells_generated_limit) return false; |       if(!limited_generation(c)) return false; | ||||||
|       cells_generated++; |  | ||||||
|       setdist(c, 7, c); |  | ||||||
|       } |       } | ||||||
|     else { |     else { | ||||||
|       ld dist = hdist0(tC0(T)); |       ld dist = hdist0(tC0(T)); | ||||||
|       if(dist > sightranges[geometry] + (vid.sloppy_3d ? 0 : corner_bonus)) return false; |       if(dist > sightranges[geometry] + (vid.sloppy_3d ? 0 : corner_bonus)) return false; | ||||||
|       if(dist <= extra_generation_distance) setdist(c, 7, c); |       if(dist <= extra_generation_distance && !limited_generation(c)) return false; | ||||||
|       } |       } | ||||||
|     return true; |     return true; | ||||||
|     } |     } | ||||||
| @@ -1738,11 +1745,7 @@ bool do_draw(cell *c, const transmatrix& T) { | |||||||
|   if(cells_drawn > vid.cells_drawn_limit) return false; |   if(cells_drawn > vid.cells_drawn_limit) return false; | ||||||
|   bool usr = vid.use_smart_range || quotient || euwrap; |   bool usr = vid.use_smart_range || quotient || euwrap; | ||||||
|   if(usr && cells_drawn >= 50 && !in_smart_range(T)) return false; |   if(usr && cells_drawn >= 50 && !in_smart_range(T)) return false; | ||||||
|   if(vid.use_smart_range == 2) { |   if(vid.use_smart_range == 2 && !limited_generation(c)) return false; | ||||||
|     if(cells_generated > vid.cells_generated_limit) return false; |  | ||||||
|     setdist(c, 7, c); |  | ||||||
|     cells_generated++; |  | ||||||
|     } |  | ||||||
|   return true;  |   return true;  | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue