summaryrefslogtreecommitdiff
path: root/src/saveload
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
commit4b0223976f2a4aabb0f8434ee41921673a35f3b1 (patch)
tree31dfa2532da01e5a387389bf10ae27aba5124a34 /src/saveload
parentc71949729e5bc208fe4bc2ce074a51ced2ad1ef2 (diff)
downloadopenttd-4b0223976f2a4aabb0f8434ee41921673a35f3b1.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/saveload')
-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: