summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2009-02-01 11:38:18 +0000
committerfrosch <frosch@openttd.org>2009-02-01 11:38:18 +0000
commit2afa9312fcf06190248610b9ac57416e22a2b1d4 (patch)
tree31dfa2532da01e5a387389bf10ae27aba5124a34 /src
parent16b9dcd0ea28e1166fa922552f70a67bd284479b (diff)
downloadopenttd-2afa9312fcf06190248610b9ac57416e22a2b1d4.tar.xz
(svn r15304) -Fix [FS#2587]: When loading savegames use the roadtype of the front vehicles just like it is done on construction.
Diffstat (limited to 'src')
-rw-r--r--src/saveload/vehicle_sl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp
index 1bde737d6..f5564e3f0 100644
--- a/src/saveload/vehicle_sl.cpp
+++ b/src/saveload/vehicle_sl.cpp
@@ -331,7 +331,7 @@ void AfterLoadVehicles(bool part_of_load)
FOR_ALL_VEHICLES(v) {
switch (v->type) {
case VEH_ROAD:
- v->u.road.roadtype = HasBit(EngInfo(v->engine_type)->misc_flags, EF_ROAD_TRAM) ? ROADTYPE_TRAM : ROADTYPE_ROAD;
+ v->u.road.roadtype = HasBit(EngInfo(v->First()->engine_type)->misc_flags, EF_ROAD_TRAM) ? ROADTYPE_TRAM : ROADTYPE_ROAD;
v->u.road.compatible_roadtypes = RoadTypeToRoadTypes(v->u.road.roadtype);
/* FALL THROUGH */
case VEH_TRAIN: