summaryrefslogtreecommitdiff
path: root/src/yapf
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-05-18 01:26:23 +0000
committersmatz <smatz@openttd.org>2009-05-18 01:26:23 +0000
commit0af27062c4d17148f357c0da1f8b9ce996601463 (patch)
tree1d4e22ed82a0995464f2789b1fd4c47ea8609e21 /src/yapf
parentd1f9a90d3217709903530e58a641c18d61c96918 (diff)
downloadopenttd-0af27062c4d17148f357c0da1f8b9ce996601463.tar.xz
(svn r16349) -Codechange: rename IsPlainRailTile() to IsPlainRail(), introduce shiny new IsPlainRailTile()
Diffstat (limited to 'src/yapf')
-rw-r--r--src/yapf/follow_track.hpp2
-rw-r--r--src/yapf/yapf_costrail.hpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/yapf/follow_track.hpp b/src/yapf/follow_track.hpp
index 8953cddfc..531e548a6 100644
--- a/src/yapf/follow_track.hpp
+++ b/src/yapf/follow_track.hpp
@@ -202,7 +202,7 @@ protected:
FORCEINLINE bool QueryNewTileTrackStatus()
{
CPerfStart perf(*m_pPerf);
- if (IsRailTT() && GetTileType(m_new_tile) == MP_RAILWAY && IsPlainRailTile(m_new_tile)) {
+ if (IsRailTT() && IsPlainRailTile(m_new_tile)) {
m_new_td_bits = (TrackdirBits)(GetTrackBits(m_new_tile) * 0x101);
} else {
m_new_td_bits = TrackStatusToTrackdirBits(GetTileTrackStatus(m_new_tile, TT(), m_veh != NULL ? m_veh->u.road.compatible_roadtypes : 0));
diff --git a/src/yapf/yapf_costrail.hpp b/src/yapf/yapf_costrail.hpp
index b4792db87..6eefc08c0 100644
--- a/src/yapf/yapf_costrail.hpp
+++ b/src/yapf/yapf_costrail.hpp
@@ -115,7 +115,7 @@ public:
FORCEINLINE int SwitchCost(TileIndex tile1, TileIndex tile2, DiagDirection exitdir)
{
- if (IsTileType(tile1, MP_RAILWAY) && IsTileType(tile2, MP_RAILWAY) && IsPlainRailTile(tile1) && IsPlainRailTile(tile2)) {
+ if (IsPlainRailTile(tile1) && IsPlainRailTile(tile2)) {
bool t1 = KillFirstBit(GetTrackBits(tile1) & DiagdirReachesTracks(ReverseDiagDir(exitdir))) != TRACK_BIT_NONE;
bool t2 = KillFirstBit(GetTrackBits(tile2) & DiagdirReachesTracks(exitdir)) != TRACK_BIT_NONE;
if (t1 && t2) return Yapf().PfGetSettings().rail_doubleslip_penalty;