(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.
authorfrosch
Sun, 12 Oct 2008 10:22:13 +0000
changeset 10231 f241d43cb22d
parent 10230 74440463e61e
child 10232 6b0909324733
(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.
src/station_cmd.cpp
--- a/src/station_cmd.cpp	Fri Oct 10 22:50:31 2008 +0000
+++ b/src/station_cmd.cpp	Sun Oct 12 10:22:13 2008 +0000
@@ -3043,6 +3043,8 @@
 	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 @@
 	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;
 }