diff options
author | rubidium <rubidium@openttd.org> | 2007-08-30 13:03:56 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-08-30 13:03:56 +0000 |
commit | cb7eaff3534c1d18c9c8bc06be04ceb437d97765 (patch) | |
tree | 141633b357757cb790c904dc033f8479d58ba5e5 /src/rail_cmd.cpp | |
parent | ac5fde61fb03059daee4b505dcaad84f21b93857 (diff) | |
download | openttd-cb7eaff3534c1d18c9c8bc06be04ceb437d97765.tar.xz |
(svn r11003) -Codechange: replace Vehicle->next to Vehicle->Next() and Vehicle->SetNext() so we can trap instances that change a next pointer and (in the future) update the first/previous pointers based on that.
Diffstat (limited to 'src/rail_cmd.cpp')
-rw-r--r-- | src/rail_cmd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index f88090ad2..29c44d194 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -2156,7 +2156,7 @@ static uint32 VehicleEnter_Track(Vehicle *v, TileIndex tile, int x, int y) v->u.rail.track = TRACK_BIT_DEPOT, v->vehstatus |= VS_HIDDEN; /* hide it */ v->direction = ReverseDir(v->direction); - if (v->next == NULL) VehicleEnterDepot(v); + if (v->Next() == NULL) VehicleEnterDepot(v); v->tile = tile; InvalidateWindowData(WC_VEHICLE_DEPOT, v->tile); @@ -2165,7 +2165,7 @@ static uint32 VehicleEnter_Track(Vehicle *v, TileIndex tile, int x, int y) } else if (fract_coord_leave == fract_coord) { if (DiagDirToDir(dir) == v->direction) { /* leave the depot? */ - if ((v = v->next) != NULL) { + if ((v = v->Next()) != NULL) { v->vehstatus &= ~VS_HIDDEN; v->u.rail.track = (DiagDirToAxis(dir) == AXIS_X ? TRACK_BIT_X : TRACK_BIT_Y); } |