diff options
Diffstat (limited to 'train_cmd.c')
-rw-r--r-- | train_cmd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/train_cmd.c b/train_cmd.c index 291c2ea01..4d0f434ae 100644 --- a/train_cmd.c +++ b/train_cmd.c @@ -8,6 +8,7 @@ #include "table/strings.h" #include "map.h" #include "tile.h" +#include "tunnel_map.h" #include "vehicle.h" #include "command.h" #include "pathfind.h" @@ -3121,8 +3122,10 @@ static bool TrainCheckIfLineEnds(Vehicle *v) tile = v->tile; // tunnel entrance? - if (IsTunnelTile(tile) && DiagDirToDir(GB(_m[tile].m5, 0, 2)) == v->direction) + if (IsTunnelTile(tile) && + DiagDirToDir(GetTunnelDirection(tile)) == v->direction) { return true; + } // depot? /* XXX -- When enabled, this makes it possible to crash trains of others |