diff options
author | smatz <smatz@openttd.org> | 2009-05-26 22:10:13 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-05-26 22:10:13 +0000 |
commit | 7ee882d03f4c41d8659ed82fd5be0d0efbae0a0c (patch) | |
tree | 7107a4626a58464bd677e9fb8f7576cadf1b8bf2 /src/settings.cpp | |
parent | aa546e513f6b121377fd1b6cad1b727f89b66528 (diff) | |
download | openttd-7ee882d03f4c41d8659ed82fd5be0d0efbae0a0c.tar.xz |
(svn r16441) -Codechange: new class SpecializedVehicle used as superclass for all vehicle types
Diffstat (limited to 'src/settings.cpp')
-rw-r--r-- | src/settings.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/settings.cpp b/src/settings.cpp index 37e64fb4f..fac9a0dfb 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -695,10 +695,10 @@ static bool DeleteSelectStationWindow(int32 p1) static bool UpdateConsists(int32 p1) { - Vehicle *v; - FOR_ALL_VEHICLES(v) { + Train *t; + FOR_ALL_TRAINS(t) { /* Update the consist of all trains so the maximum speed is set correctly. */ - if (v->type == VEH_TRAIN && (IsFrontEngine(v) || IsFreeWagon(v))) TrainConsistChanged((Train *)v, true); + if (IsFrontEngine(t) || IsFreeWagon(t)) TrainConsistChanged(t, true); } return true; } @@ -732,10 +732,9 @@ static bool CheckInterval(int32 p1) static bool TrainAccelerationModelChanged(int32 p1) { - Vehicle *v; - - FOR_ALL_VEHICLES(v) { - if (v->type == VEH_TRAIN && IsFrontEngine(v)) UpdateTrainAcceleration((Train *)v); + Train *t; + FOR_ALL_TRAINS(t) { + if (IsFrontEngine(t)) UpdateTrainAcceleration(t); } return true; |