(svn r16907) -Codechange: make a more clear distinction between reservation functions that return a bool and that return TrackBits; GetRailStationReservation vs GetRailwayStationReservation, which one returns the bool and which one the TrackBits?
This commit is contained in:
@@ -137,7 +137,7 @@ struct CFollowTrackT
|
||||
/* Check skipped station tiles as well. */
|
||||
TileIndexDiff diff = TileOffsByDiagDir(m_exitdir);
|
||||
for (TileIndex tile = m_new_tile - diff * m_tiles_skipped; tile != m_new_tile; tile += diff) {
|
||||
if (GetRailwayStationReservation(tile)) {
|
||||
if (HasStationReservation(tile)) {
|
||||
m_new_td_bits = TRACKDIR_BIT_NONE;
|
||||
m_err = EC_RESERVED;
|
||||
return false;
|
||||
|
@@ -153,7 +153,7 @@ public:
|
||||
{
|
||||
TileIndexDiff diff = TileOffsByDiagDir(TrackdirToExitdir(ReverseTrackdir(trackdir)));
|
||||
for (; skipped >= 0; skipped--, tile += diff) {
|
||||
if (GetRailwayStationReservation(tile)) return true;
|
||||
if (HasStationReservation(tile)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@@ -69,7 +69,7 @@ private:
|
||||
TileIndexDiff diff = TileOffsByDiagDir(dir);
|
||||
|
||||
do {
|
||||
if (GetRailwayStationReservation(tile)) return false;
|
||||
if (HasStationReservation(tile)) return false;
|
||||
SetRailwayStationReservation(tile, true);
|
||||
MarkTileDirtyByTile(tile);
|
||||
tile = TILE_ADD(tile, diff);
|
||||
|
Reference in New Issue
Block a user