Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uint16 x = (t->larger_town ?
- _settings_game.citymania.mapgen.custom_city_house_count :
- _settings_game.citymania.mapgen.custom_town_house_count);
- if (!x) return false; // fall back to default generation
- // limited size generation
- int expected_size = t->cache.num_houses + x;
- int i = (int)x * 4, j = x;
- if (_settings_game.game_creation.landscape == LT_TROPIC ||
- _settings_game.game_creation.landscape == LT_ARCTIC) {
- i *= 4;
- }
- do {
- t->cache.num_houses = expected_size;
- UpdateTownRadius(t);
- GrowTown(t);
- j -= t->cache.num_houses - expected_size;
- } while (--i && j);
- t->cache.num_houses = expected_size - j;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement