diff options
author | peter1138 <peter1138@openttd.org> | 2007-04-11 21:04:03 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2007-04-11 21:04:03 +0000 |
commit | 69982b1f018d120bd99338f9260760984a5ce98b (patch) | |
tree | bb3bdbca60f3320458aaf7a9f6d6d1da9cc03590 /src/waypoint.cpp | |
parent | b47078d6903a9e7e9969351e86b00a1d7db6c90f (diff) | |
download | openttd-69982b1f018d120bd99338f9260760984a5ce98b.tar.xz |
(svn r9601) -Codechange: Store grf file reference in station spec, not just GRF ID
Diffstat (limited to 'src/waypoint.cpp')
-rw-r--r-- | src/waypoint.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/waypoint.cpp b/src/waypoint.cpp index a7e02d6f1..b981694b7 100644 --- a/src/waypoint.cpp +++ b/src/waypoint.cpp @@ -22,6 +22,7 @@ #include "vehicle.h" #include "yapf/yapf.h" #include "date.h" +#include "newgrf.h" enum { MAX_WAYPOINTS_PER_TOWN = 64, @@ -181,7 +182,7 @@ void AfterLoadWaypoints() for (i = 0; i < GetNumCustomStations(STAT_CLASS_WAYP); i++) { const StationSpec *statspec = GetCustomStationSpec(STAT_CLASS_WAYP, i); - if (statspec != NULL && statspec->grfid == wp->grfid && statspec->localidx == wp->localidx) { + if (statspec != NULL && statspec->grffile->grfid == wp->grfid && statspec->localidx == wp->localidx) { wp->stat_id = i; break; } @@ -250,7 +251,7 @@ int32 CmdBuildTrainWaypoint(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) if (statspec != NULL) { wp->stat_id = p1; - wp->grfid = statspec->grfid; + wp->grfid = statspec->grffile->grfid; wp->localidx = statspec->localidx; } else { /* Specified custom graphics do not exist, so use default. */ |