src/openttd.cpp
changeset 9059 04edde3eb0c6
parent 9052 392f5995d323
child 9094 58d1cddf1af6
equal deleted inserted replaced
9058:b9c3fec968b8 9059:04edde3eb0c6
  2386 				for (RoadType rt = ROADTYPE_ROAD; rt < ROADTYPE_END; rt++) {
  2386 				for (RoadType rt = ROADTYPE_ROAD; rt < ROADTYPE_END; rt++) {
  2387 					/* update even non-existing road types to update tile owner too */
  2387 					/* update even non-existing road types to update tile owner too */
  2388 					Owner o = GetRoadOwner(t, rt);
  2388 					Owner o = GetRoadOwner(t, rt);
  2389 					if (IsValidPlayer(o) && !GetPlayer(o)->is_active) SetRoadOwner(t, rt, OWNER_NONE);
  2389 					if (IsValidPlayer(o) && !GetPlayer(o)->is_active) SetRoadOwner(t, rt, OWNER_NONE);
  2390 				}
  2390 				}
  2391 				if (GetRoadTileType(t) == ROAD_TILE_CROSSING) {
  2391 				if (IsLevelCrossing(t)) {
  2392 					Owner o = GetTileOwner(t);
  2392 					Owner o = GetTileOwner(t);
  2393 					if (!GetPlayer(o)->is_active) {
  2393 					if (!GetPlayer(o)->is_active) {
  2394 						/* remove leftover rail piece from crossing (from very old savegames) */
  2394 						/* remove leftover rail piece from crossing (from very old savegames) */
  2395 						_current_player = o;
  2395 						_current_player = o;
  2396 						DoCommand(t, 0, AxisToTrack(OtherAxis(GetCrossingRoadAxis(t))), DC_EXEC | DC_BANKRUPT, CMD_REMOVE_SINGLE_RAIL);
  2396 						DoCommand(t, 0, AxisToTrack(OtherAxis(GetCrossingRoadAxis(t))), DC_EXEC | DC_BANKRUPT, CMD_REMOVE_SINGLE_RAIL);