src/town_cmd.cpp
changeset 10345 812495bb9c04
parent 10340 a4757ae623ca
child 10360 049db04f827f
equal deleted inserted replaced
10344:c33159ae992a 10345:812495bb9c04
  2478 		case MP_ROAD:
  2478 		case MP_ROAD:
  2479 			if (!HasTownOwnedRoad(tile)) {
  2479 			if (!HasTownOwnedRoad(tile)) {
  2480 				TownID tid = GetTownIndex(tile);
  2480 				TownID tid = GetTownIndex(tile);
  2481 				if (tid == (TownID)INVALID_TOWN) {
  2481 				if (tid == (TownID)INVALID_TOWN) {
  2482 					/* in the case we are generating "many random towns", this value may be INVALID_TOWN */
  2482 					/* in the case we are generating "many random towns", this value may be INVALID_TOWN */
  2483 					if (_generating_world) CalcClosestTownFromTile(tile, threshold);
  2483 					if (_generating_world) return CalcClosestTownFromTile(tile, threshold);
  2484 					assert(GetNumTowns() == 0);
  2484 					assert(GetNumTowns() == 0);
  2485 					return NULL;
  2485 					return NULL;
  2486 				}
  2486 				}
  2487 
  2487 
  2488 				Town *town = GetTown(tid);
  2488 				Town *town = GetTown(tid);