summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2006-09-22 22:15:34 +0000
committerglx <glx@openttd.org>2006-09-22 22:15:34 +0000
commitf03975c251caff6d6ea846eeaeb6a2fa1b8414a7 (patch)
tree43cb9a80708fa2880cf3bde190930ab52c7d9720
parentec48e0a72bb94baca4fe9acc674a3c4843566508 (diff)
downloadopenttd-f03975c251caff6d6ea846eeaeb6a2fa1b8414a7.tar.xz
(svn r6496) -Codechange: removed direct map access in train_cmd.c (Rubidium)
-rw-r--r--train_cmd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/train_cmd.c b/train_cmd.c
index 73bda7601..c63941e59 100644
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -3107,12 +3107,12 @@ red_light: {
* FIND_FIRST_BIT only handles 6 bits at a time. */
i = FindFirstBit2x64(ts);
- if (!(_m[gp.new_tile].m3 & SignalAgainstTrackdir(i))) {
+ if (!HasSignalOnTrackdir(gp.new_tile, ReverseTrackdir(i))) {
v->cur_speed = 0;
v->subspeed = 0;
v->progress = 255 - 100;
if (++v->load_unload_time_rem < _patches.wait_oneway_signal * 20) return;
- } else if (_m[gp.new_tile].m3 & SignalAlongTrackdir(i)){
+ } else if (HasSignalOnTrackdir(gp.new_tile, i)){
v->cur_speed = 0;
v->subspeed = 0;
v->progress = 255-10;
@@ -3316,7 +3316,7 @@ static bool TrainCheckIfLineEnds(Vehicle *v)
// depot?
/* XXX -- When enabled, this makes it possible to crash trains of others
(by building a depot right against a station) */
-/* if (IsTileType(tile, MP_RAILWAY) && (_m[tile].m5 & 0xFC) == 0xC0)
+/* if (IsTileType(tile, MP_RAILWAY) && GetRailTileType(tile) == RAIL_TILE_DEPOT_WAYPOINT)
return true;*/
/* Determine the non-diagonal direction in which we will exit this tile */