mirror of https://github.com/OpenTTD/OpenTTD
parent
13348b7790
commit
3e2060f155
|
@ -1439,20 +1439,6 @@ CommandCost CmdBuildRailStation(DoCommandFlag flags, TileIndex tile_org, RailTyp
|
||||||
SetStationTileRandomBits(tile, GB(Random(), 0, 4));
|
SetStationTileRandomBits(tile, GB(Random(), 0, 4));
|
||||||
SetAnimationFrame(tile, 0);
|
SetAnimationFrame(tile, 0);
|
||||||
|
|
||||||
/* Should be the same as layout but axis component could be wrong... */
|
|
||||||
StationGfx gfx = GetStationGfx(tile);
|
|
||||||
bool blocked = statspec != nullptr && HasBit(statspec->blocked, gfx);
|
|
||||||
/* Default stations do not draw pylons under roofs (gfx >= 4) */
|
|
||||||
bool pylons = statspec != nullptr ? HasBit(statspec->pylons, gfx) : gfx < 4;
|
|
||||||
bool wires = statspec == nullptr || !HasBit(statspec->wires, gfx);
|
|
||||||
|
|
||||||
SetStationTileBlocked(tile, blocked);
|
|
||||||
SetStationTileHavePylons(tile, pylons);
|
|
||||||
SetStationTileHaveWires(tile, wires);
|
|
||||||
|
|
||||||
if (!blocked) c->infrastructure.rail[rt]++;
|
|
||||||
c->infrastructure.station++;
|
|
||||||
|
|
||||||
if (statspec != nullptr) {
|
if (statspec != nullptr) {
|
||||||
/* Use a fixed axis for GetPlatformInfo as our platforms / numtracks are always the right way around */
|
/* Use a fixed axis for GetPlatformInfo as our platforms / numtracks are always the right way around */
|
||||||
uint32_t platinfo = GetPlatformInfo(AXIS_X, GetStationGfx(tile), plat_len, numtracks_orig, plat_len - w, numtracks_orig - numtracks, false);
|
uint32_t platinfo = GetPlatformInfo(AXIS_X, GetStationGfx(tile), plat_len, numtracks_orig, plat_len - w, numtracks_orig - numtracks, false);
|
||||||
|
@ -1471,6 +1457,20 @@ CommandCost CmdBuildRailStation(DoCommandFlag flags, TileIndex tile_org, RailTyp
|
||||||
TriggerStationAnimation(st, tile, SAT_BUILT);
|
TriggerStationAnimation(st, tile, SAT_BUILT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Should be the same as layout but axis component could be wrong... */
|
||||||
|
StationGfx gfx = GetStationGfx(tile);
|
||||||
|
bool blocked = statspec != nullptr && HasBit(statspec->blocked, gfx);
|
||||||
|
/* Default stations do not draw pylons under roofs (gfx >= 4) */
|
||||||
|
bool pylons = statspec != nullptr ? HasBit(statspec->pylons, gfx) : gfx < 4;
|
||||||
|
bool wires = statspec == nullptr || !HasBit(statspec->wires, gfx);
|
||||||
|
|
||||||
|
SetStationTileBlocked(tile, blocked);
|
||||||
|
SetStationTileHavePylons(tile, pylons);
|
||||||
|
SetStationTileHaveWires(tile, wires);
|
||||||
|
|
||||||
|
if (!blocked) c->infrastructure.rail[rt]++;
|
||||||
|
c->infrastructure.station++;
|
||||||
|
|
||||||
tile += tile_delta;
|
tile += tile_delta;
|
||||||
} while (--w);
|
} while (--w);
|
||||||
AddTrackToSignalBuffer(tile_track, track, _current_company);
|
AddTrackToSignalBuffer(tile_track, track, _current_company);
|
||||||
|
|
Loading…
Reference in New Issue