summaryrefslogtreecommitdiff
path: root/src/npf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/npf.cpp')
-rw-r--r--src/npf.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/npf.cpp b/src/npf.cpp
index 5502b2206..65e3faa66 100644
--- a/src/npf.cpp
+++ b/src/npf.cpp
@@ -1070,8 +1070,8 @@ NPFFoundTargetData NPFRouteToSafeTile(const Train *v, TileIndex tile, Trackdir t
start1.direction = trackdir;
NPFSetFlag(&start1, NPF_FLAG_IGNORE_RESERVED, true);
- RailTypes railtypes = v->u.rail.compatible_railtypes;
- if (override_railtype) railtypes |= GetRailTypeInfo(v->u.rail.railtype)->compatible_railtypes;
+ RailTypes railtypes = v->compatible_railtypes;
+ if (override_railtype) railtypes |= GetRailTypeInfo(v->railtype)->compatible_railtypes;
/* perform a breadth first search. Target is NULL,
* since we are just looking for any safe tile...*/