src/town_cmd.cpp
changeset 7390 16fb97ba8133
parent 7386 93f6a042d1c3
child 7401 7a72cc2a1196
equal deleted inserted replaced
7389:08d6a6265ced 7390:16fb97ba8133
    59 	DeleteWindowById(WC_TOWN_VIEW, this->index);
    59 	DeleteWindowById(WC_TOWN_VIEW, this->index);
    60 	_town_sort_dirty = true;
    60 	_town_sort_dirty = true;
    61 	_total_towns--;
    61 	_total_towns--;
    62 
    62 
    63 	/* Delete all industries belonging to the town */
    63 	/* Delete all industries belonging to the town */
    64 	FOR_ALL_INDUSTRIES(i) if (i->town == this) DeleteIndustry(i);
    64 	FOR_ALL_INDUSTRIES(i) if (i->town == this) delete i;
    65 
    65 
    66 	/* Go through all tiles and delete those belonging to the town */
    66 	/* Go through all tiles and delete those belonging to the town */
    67 	for (TileIndex tile = 0; tile < MapSize(); ++tile) {
    67 	for (TileIndex tile = 0; tile < MapSize(); ++tile) {
    68 		switch (GetTileType(tile)) {
    68 		switch (GetTileType(tile)) {
    69 			case MP_HOUSE:
    69 			case MP_HOUSE: