src/town_cmd.cpp
changeset 7906 3fe5ef622ddd
parent 7897 222641b84fc4
child 7909 8df54a2839a1
equal deleted inserted replaced
7905:49595718ef80 7906:3fe5ef622ddd
    45 /* Initialize the town-pool */
    45 /* Initialize the town-pool */
    46 DEFINE_OLD_POOL_GENERIC(Town, Town)
    46 DEFINE_OLD_POOL_GENERIC(Town, Town)
    47 
    47 
    48 Town::Town(TileIndex tile)
    48 Town::Town(TileIndex tile)
    49 {
    49 {
       
    50 	if (tile != 0) _total_towns++;
    50 	this->xy = tile;
    51 	this->xy = tile;
    51 }
    52 }
    52 
    53 
    53 Town::~Town()
    54 Town::~Town()
    54 {
    55 {
  1352 static void DoCreateTown(Town *t, TileIndex tile, uint32 townnameparts, TownSizeMode size_mode, uint size)
  1353 static void DoCreateTown(Town *t, TileIndex tile, uint32 townnameparts, TownSizeMode size_mode, uint size)
  1353 {
  1354 {
  1354 	extern int _nb_orig_names;
  1355 	extern int _nb_orig_names;
  1355 	int x, i;
  1356 	int x, i;
  1356 
  1357 
  1357 	_total_towns++;
       
  1358 
       
  1359 	t->xy = tile;
  1358 	t->xy = tile;
  1360 	t->num_houses = 0;
  1359 	t->num_houses = 0;
  1361 	t->time_until_rebuild = 10;
  1360 	t->time_until_rebuild = 10;
  1362 	UpdateTownRadius(t);
  1361 	UpdateTownRadius(t);
  1363 	t->flags12 = 0;
  1362 	t->flags12 = 0;