Changeset - r10231:68df8fc5e3df
[Not reviewed]
master
0 1 0
frosch - 16 years ago 2008-10-12 10:22:13
frosch@openttd.org
(svn r14459) -Fix [FS#2343]: Update station-spread when building or removing oilrigs to make them consistent with station-spread-calculation on game-load and to make oilrig-stations behave like any other station type.
1 file changed with 5 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/station_cmd.cpp
Show inline comments
 
@@ -3043,6 +3043,8 @@ void BuildOilRig(TileIndex tile)
 
	st->facilities = FACIL_AIRPORT | FACIL_DOCK;
 
	st->build_date = _date;
 

	
 
	st->rect.BeforeAddTile(tile, StationRect::ADD_FORCE);
 

	
 
	for (CargoID j = 0; j < NUM_CARGO; j++) {
 
		st->goods[j].acceptance_pickup = 0;
 
		st->goods[j].days_since_pickup = 255;
 
@@ -3066,6 +3068,9 @@ void DeleteOilRig(TileIndex tile)
 
	st->airport_tile = 0;
 
	st->facilities &= ~(FACIL_AIRPORT | FACIL_DOCK);
 
	st->airport_flags = 0;
 

	
 
	st->rect.AfterRemoveTile(st, tile);
 

	
 
	UpdateStationVirtCoordDirty(st);
 
	if (st->facilities == 0) delete st;
 
}
0 comments (0 inline, 0 general)