Changeset - r15699:1fe53986cb73
[Not reviewed]
master
0 3 0
yexo - 14 years ago 2010-08-05 12:06:53
yexo@openttd.org
(svn r20375) -Codechange: make sure the watertype for existing airport tiles is set to invalid
3 files changed with 10 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/saveload/afterload.cpp
Show inline comments
 
@@ -2153,6 +2153,12 @@ bool AfterLoadGame()
 
		FOR_ALL_DEPOTS(d) d->build_date = _date;
 
	}
 

	
 
	if (CheckSavegameVersion(145)) {
 
		for (TileIndex t = 0; t < map_size; t++) {
 
			if (IsAirportTile(t)) SetWaterClass(t, WATER_CLASS_INVALID);
 
		}
 
	}
 

	
 
	/* Road stops is 'only' updating some caches */
 
	AfterLoadRoadStops();
 
	AfterLoadLabelMaps();
src/station_cmd.cpp
Show inline comments
 
@@ -2225,7 +2225,7 @@ CommandCost CmdBuildAirport(TileIndex ti
 
		it = as->table[layout];
 
		do {
 
			TileIndex cur_tile = tile + ToTileIndexDiff(it->ti);
 
			MakeAirport(cur_tile, st->owner, st->index, it->gfx);
 
			MakeAirport(cur_tile, st->owner, st->index, it->gfx, WATER_CLASS_INVALID);
 
			SetStationTileRandomBits(cur_tile, GB(Random(), 0, 4));
 
			st->airport.Add(cur_tile);
 

	
src/station_map.h
Show inline comments
 
@@ -640,10 +640,12 @@ static inline void MakeDriveThroughRoadS
 
 * @param o the owner of the airport
 
 * @param sid the station to which this tile belongs
 
 * @param section the StationGfx to be used for this tile
 
 * @param wc the type of water on this tile
 
 */
 
static inline void MakeAirport(TileIndex t, Owner o, StationID sid, byte section)
 
static inline void MakeAirport(TileIndex t, Owner o, StationID sid, byte section, WaterClass wc)
 
{
 
	MakeStation(t, o, sid, STATION_AIRPORT, section);
 
	SetWaterClass(t, wc);
 
}
 

	
 
/**
0 comments (0 inline, 0 general)