mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-22 11:44:17 +01:00
(svn r13198) [0.6] -Backport from trunk (r12910, r12914, r12915, r12919, r12920):
- Fix: Town rating was affected even after the test run (r12920) - Fix: Flood road tiles even when there are road works in progress [FS#1965] (r12919) - Fix: Do not initialize Station struct with tile=0, buoys will never change that value [FS#1960] (r12915) - Fix: Game crash when a spectator/server tried to show an engine with no owner when a NewGRF requested a specific variable (r12914) - Fix: Report reverse sprite status (FD/FE) to NewGRF for manually toggled vehicles (r12910)
This commit is contained in:
@@ -984,7 +984,7 @@ CommandCost CmdBuildRailroadStation(TileIndex tile_org, uint32 flags, uint32 p1,
|
||||
if (!Station::CanAllocateItem()) return_cmd_error(STR_3008_TOO_MANY_STATIONS_LOADING);
|
||||
|
||||
if (flags & DC_EXEC) {
|
||||
st = new Station();
|
||||
st = new Station(tile_org);
|
||||
|
||||
st->town = ClosestTownFromTile(tile_org, (uint)-1);
|
||||
GenerateStationName(st, tile_org, STATIONNAMING_RAIL);
|
||||
@@ -1398,7 +1398,7 @@ CommandCost CmdBuildRoadStop(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
||||
if (!Station::CanAllocateItem()) return_cmd_error(STR_3008_TOO_MANY_STATIONS_LOADING);
|
||||
|
||||
if (flags & DC_EXEC) {
|
||||
st = new Station();
|
||||
st = new Station(tile);
|
||||
|
||||
st->town = ClosestTownFromTile(tile, (uint)-1);
|
||||
GenerateStationName(st, tile, STATIONNAMING_ROAD);
|
||||
@@ -1704,7 +1704,7 @@ CommandCost CmdBuildAirport(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
||||
if (!Station::CanAllocateItem()) return_cmd_error(STR_3008_TOO_MANY_STATIONS_LOADING);
|
||||
|
||||
if (flags & DC_EXEC) {
|
||||
st = new Station();
|
||||
st = new Station(tile);
|
||||
|
||||
st->town = ClosestTownFromTile(tile, (uint)-1);
|
||||
GenerateStationName(st, tile, !(afc->flags & AirportFTAClass::AIRPLANES) ? STATIONNAMING_HELIPORT : STATIONNAMING_AIRPORT);
|
||||
@@ -1820,7 +1820,7 @@ CommandCost CmdBuildBuoy(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
||||
if (!Station::CanAllocateItem()) return_cmd_error(STR_3008_TOO_MANY_STATIONS_LOADING);
|
||||
|
||||
if (flags & DC_EXEC) {
|
||||
Station *st = new Station();
|
||||
Station *st = new Station(tile);
|
||||
|
||||
st->town = ClosestTownFromTile(tile, (uint)-1);
|
||||
GenerateStationName(st, tile, STATIONNAMING_BUOY);
|
||||
@@ -1983,7 +1983,7 @@ CommandCost CmdBuildDock(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
||||
if (!Station::CanAllocateItem()) return_cmd_error(STR_3008_TOO_MANY_STATIONS_LOADING);
|
||||
|
||||
if (flags & DC_EXEC) {
|
||||
st = new Station();
|
||||
st = new Station(tile);
|
||||
|
||||
st->town = ClosestTownFromTile(tile, (uint)-1);
|
||||
GenerateStationName(st, tile, STATIONNAMING_DOCK);
|
||||
@@ -2798,7 +2798,7 @@ uint MoveGoodsToStation(TileIndex tile, int w, int h, CargoID type, uint amount)
|
||||
|
||||
void BuildOilRig(TileIndex tile)
|
||||
{
|
||||
Station *st = new Station();
|
||||
Station *st = new Station(tile);
|
||||
|
||||
if (st == NULL) {
|
||||
DEBUG(misc, 0, "Can't allocate station for oilrig at 0x%X, reverting to oilrig only", tile);
|
||||
|
||||
Reference in New Issue
Block a user