diff options
author | smatz <smatz@openttd.org> | 2009-07-02 12:10:39 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-07-02 12:10:39 +0000 |
commit | 6a0855f0d1cd953c8774a03a1abc06553310f1a5 (patch) | |
tree | c97c8f2c0ef33f4795f38083438e44185de9f248 /src/saveload | |
parent | 4d14c1b534947ed38780995af4d68bd67b4ae095 (diff) | |
download | openttd-6a0855f0d1cd953c8774a03a1abc06553310f1a5.tar.xz |
(svn r16723) -Codechange: make GetNextArticPart(), GetLastEnginePart(), GetNextVehicle(), GetPrevVehicle(), GetNextUnit(), GetPrevUnit() members of Train
Diffstat (limited to 'src/saveload')
-rw-r--r-- | src/saveload/vehicle_sl.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp index 10d7d3c9c..bd1202fb6 100644 --- a/src/saveload/vehicle_sl.cpp +++ b/src/saveload/vehicle_sl.cpp @@ -44,7 +44,7 @@ void ConnectMultiheadedTrains() bool sequential_matching = v->IsFrontEngine(); - for (Train *u = v; u != NULL; u = GetNextVehicle(u)) { + for (Train *u = v; u != NULL; u = u->GetNextVehicle()) { if (u->other_multiheaded_part != NULL) continue; // we already linked this one if (u->IsMultiheaded()) { @@ -58,7 +58,7 @@ void ConnectMultiheadedTrains() EngineID eid = u->engine_type; Train *w; if (sequential_matching) { - for (w = GetNextVehicle(u); w != NULL; w = GetNextVehicle(w)) { + for (w = u->GetNextVehicle(); w != NULL; w = w->GetNextVehicle()) { if (w->engine_type != eid || w->other_multiheaded_part != NULL || !w->IsMultiheaded()) continue; /* we found a car to partner with this engine. Now we will make sure it face the right way */ @@ -70,7 +70,7 @@ void ConnectMultiheadedTrains() } } else { uint stack_pos = 0; - for (w = GetNextVehicle(u); w != NULL; w = GetNextVehicle(w)) { + for (w = u->GetNextVehicle(); w != NULL; w = w->GetNextVehicle()) { if (w->engine_type != eid || w->other_multiheaded_part != NULL || !w->IsMultiheaded()) continue; if (w->IsEngine()) { |