src/station_cmd.cpp
changeset 9014 223a4ddb80bb
parent 8993 0794cc59940d
child 9015 4a44c6974ac1
equal deleted inserted replaced
9013:a1e323756e1d 9014:223a4ddb80bb
  2885 
  2885 
  2886 	if (new_player != PLAYER_SPECTATOR) {
  2886 	if (new_player != PLAYER_SPECTATOR) {
  2887 		Station* st = GetStationByTile(tile);
  2887 		Station* st = GetStationByTile(tile);
  2888 
  2888 
  2889 		SetTileOwner(tile, new_player);
  2889 		SetTileOwner(tile, new_player);
  2890 		st->owner = new_player;
  2890 		if (!IsBuoy(tile)) st->owner = new_player; // do not set st->owner for buoys
  2891 		RebuildStationLists();
  2891 		RebuildStationLists();
  2892 		InvalidateWindowClasses(WC_STATION_LIST);
  2892 		InvalidateWindowClasses(WC_STATION_LIST);
  2893 	} else {
  2893 	} else {
  2894 		if (IsDriveThroughStopTile(tile) && GetStopBuiltOnTownRoad(tile)) {
  2894 		if (IsDriveThroughStopTile(tile) && GetStopBuiltOnTownRoad(tile)) {
  2895 			/* For a drive-through stop on a town-owned road remove the stop and replace the road */
  2895 			/* For a drive-through stop on a town-owned road remove the stop and replace the road */