diff options
author | tron <tron@openttd.org> | 2007-02-25 11:36:19 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2007-02-25 11:36:19 +0000 |
commit | 3ce4baa9fc9b8973503fdaea37a408ff0852c659 (patch) | |
tree | 7356de7ae644522ac46c52158203c96f0a69cb23 /src | |
parent | 1ce43c1a3754499902a2749f9db3c426595ab02f (diff) | |
download | openttd-3ce4baa9fc9b8973503fdaea37a408ff0852c659.tar.xz |
(svn r8899) -Fix
Remove the unused second parameter from GetTileRailType()
Diffstat (limited to 'src')
-rw-r--r-- | src/npf.cpp | 2 | ||||
-rw-r--r-- | src/rail.cpp | 2 | ||||
-rw-r--r-- | src/rail_map.h | 6 | ||||
-rw-r--r-- | src/train_cmd.cpp | 4 | ||||
-rw-r--r-- | src/yapf/follow_track.hpp | 2 | ||||
-rw-r--r-- | src/yapf/yapf_costrail.hpp | 4 |
6 files changed, 8 insertions, 12 deletions
diff --git a/src/npf.cpp b/src/npf.cpp index f8ac93bb5..50b5b4bb9 100644 --- a/src/npf.cpp +++ b/src/npf.cpp @@ -594,7 +594,7 @@ static void NPFFollowTrack(AyStar* aystar, OpenListNode* current) /* check correct rail type (mono, maglev, etc) */ if (type == TRANSPORT_RAIL) { - RailType dst_type = GetTileRailType(dst_tile, TrackdirToTrack(src_trackdir)); + RailType dst_type = GetTileRailType(dst_tile); if (!HASBIT(aystar->user_data[NPF_RAILTYPES], dst_type)) return; } diff --git a/src/rail.cpp b/src/rail.cpp index 2255b428b..dd2674d2d 100644 --- a/src/rail.cpp +++ b/src/rail.cpp @@ -102,7 +102,7 @@ extern const Trackdir _dir_to_diag_trackdir[] = { }; -RailType GetTileRailType(TileIndex tile, Track track) +RailType GetTileRailType(TileIndex tile) { switch (GetTileType(tile)) { case MP_RAILWAY: diff --git a/src/rail_map.h b/src/rail_map.h index 60c7f3f6f..6efc2824d 100644 --- a/src/rail_map.h +++ b/src/rail_map.h @@ -261,12 +261,8 @@ static inline SignalState GetSignalStateByTrackdir(TileIndex tile, Trackdir trac /** * Return the rail type of tile, or INVALID_RAILTYPE if this is no rail tile. - * Note that there is no check if the given trackdir is actually present on - * the tile! - * The given trackdir is used when there are (could be) multiple rail types on - * one tile. */ -RailType GetTileRailType(TileIndex tile, Track track); +RailType GetTileRailType(TileIndex tile); typedef enum RailGroundType { diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 2bde6e7a0..b221c7f9c 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -2012,7 +2012,7 @@ static void HandleLocomotiveSmokeCloud(const Vehicle* v) if (IsTileDepotType(v->tile, TRANSPORT_RAIL) || IsTunnelTile(v->tile)) continue; // No sparks for electric vehicles on nonelectrified tracks - if (!HasPowerOnRail(v->u.rail.railtype, GetTileRailType(v->tile, TrackdirToTrack(GetVehicleTrackdir(v))))) continue; + if (!HasPowerOnRail(v->u.rail.railtype, GetTileRailType(v->tile))) continue; if (effect_type == 0) { // Use default effect type for engine class. @@ -3019,7 +3019,7 @@ static void TrainController(Vehicle *v, bool update_image) if (!HASBIT(r, VETS_ENTERED_WORMHOLE)) { v->tile = gp.new_tile; - if (GetTileRailType(gp.new_tile, FindFirstTrack(chosen_track)) != GetTileRailType(gp.old_tile, FindFirstTrack(v->u.rail.track))) { + if (GetTileRailType(gp.new_tile) != GetTileRailType(gp.old_tile)) { TrainPowerChanged(GetFirstVehicleInChain(v)); } diff --git a/src/yapf/follow_track.hpp b/src/yapf/follow_track.hpp index 99c6ea20e..4e0a29a87 100644 --- a/src/yapf/follow_track.hpp +++ b/src/yapf/follow_track.hpp @@ -173,7 +173,7 @@ protected: // rail transport is possible only on compatible rail types if (IsRailTT()) { - RailType rail_type = GetTileRailType(m_new_tile, TrackdirToTrack(DiagdirToDiagTrackdir(m_exitdir))); + RailType rail_type = GetTileRailType(m_new_tile); if (!HASBIT(m_veh->u.rail.compatible_railtypes, rail_type)) { // incompatible rail type return false; diff --git a/src/yapf/yapf_costrail.hpp b/src/yapf/yapf_costrail.hpp index 4335c8a5b..9a37b28e5 100644 --- a/src/yapf/yapf_costrail.hpp +++ b/src/yapf/yapf_costrail.hpp @@ -192,7 +192,7 @@ public: Trackdir trackdir = n.m_key.m_td; TileType tile_type = GetTileType(tile); - RailType rail_type = GetTileRailType(tile, TrackdirToTrack(trackdir)); + RailType rail_type = GetTileRailType(tile); bool target_seen = Yapf().PfDetectDestination(tile, trackdir); @@ -254,7 +254,7 @@ public: // if tail type changes, finish segment (cached segment can't contain more rail types) { - RailType new_rail_type = GetTileRailType(F.m_new_tile, TrackdirToTrack(FindFirstTrackdir(F.m_new_td_bits))); + RailType new_rail_type = GetTileRailType(F.m_new_tile); if (new_rail_type != rail_type) { break; } |