(svn r1952) Fix: Hopefully fixed the enormous towns growth slowdown in large maps. (Inspired by toholio.)
This commit is contained in:
		
							
								
								
									
										17
									
								
								town_cmd.c
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								town_cmd.c
									
									
									
									
									
								
							@@ -429,18 +429,23 @@ void OnTick_Town(void)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
	uint i;
 | 
						uint i;
 | 
				
			||||||
	Town *t;
 | 
						Town *t;
 | 
				
			||||||
 | 
						int towns;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (_game_mode == GM_EDITOR)
 | 
						if (_game_mode == GM_EDITOR)
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	i = _cur_town_ctr;
 | 
						/* FIXME: This way we scale for larger map, but not for the smaller
 | 
				
			||||||
	if (++_cur_town_ctr >= GetTownPoolSize())
 | 
						 * ones. --pasky */
 | 
				
			||||||
		_cur_town_ctr = 0;
 | 
						for (towns = ScaleByMapSize(1); towns > 0; towns--) {
 | 
				
			||||||
 | 
							i = _cur_town_ctr;
 | 
				
			||||||
 | 
							if (++_cur_town_ctr >= GetTownPoolSize())
 | 
				
			||||||
 | 
								_cur_town_ctr = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	t = GetTown(i);
 | 
							t = GetTown(i);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (t->xy != 0)
 | 
							if (t->xy != 0)
 | 
				
			||||||
		TownTickHandler(t);
 | 
								TownTickHandler(t);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static byte GetTownRoadMask(TileIndex tile)
 | 
					static byte GetTownRoadMask(TileIndex tile)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user