summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-05-22 18:17:20 +0000
committerrubidium <rubidium@openttd.org>2009-05-22 18:17:20 +0000
commit441011b782294e93b47876f24de96a63da7dd678 (patch)
tree7592579bbde1a91f353a6d685a8a64128f6a6955 /src/saveload
parentcf0cfb908f02ca54efd5956f11909514de062015 (diff)
downloadopenttd-441011b782294e93b47876f24de96a63da7dd678.tar.xz
(svn r16382) -Codechange: make GetVehicleTrackdir a member function of Vehicle.
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/oldloader_sl.cpp4
-rw-r--r--src/saveload/vehicle_sl.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp
index 5e6202401..d692be42b 100644
--- a/src/saveload/oldloader_sl.cpp
+++ b/src/saveload/oldloader_sl.cpp
@@ -1103,7 +1103,7 @@ static const OldChunks vehicle_road_chunk[] = {
};
static const OldChunks vehicle_ship_chunk[] = {
- OCL_SVAR( OC_UINT8, VehicleShip, state ),
+ OCL_SVAR( OC_UINT8, Ship, state ),
OCL_NULL( 9 ), ///< Junk
@@ -1158,7 +1158,7 @@ static bool LoadOldVehicleUnion(LoadgameState *ls, int num)
default: NOT_REACHED();
case VEH_TRAIN : res = LoadChunk(ls, &v->u.rail, vehicle_train_chunk); break;
case VEH_ROAD : res = LoadChunk(ls, &v->u.road, vehicle_road_chunk); break;
- case VEH_SHIP : res = LoadChunk(ls, &v->u.ship, vehicle_ship_chunk); break;
+ case VEH_SHIP : res = LoadChunk(ls, v, vehicle_ship_chunk); break;
case VEH_AIRCRAFT: res = LoadChunk(ls, &v->u.air, vehicle_air_chunk); break;
case VEH_EFFECT : res = LoadChunk(ls, &v->u.effect, vehicle_effect_chunk); break;
case VEH_DISASTER: res = LoadChunk(ls, &v->u.disaster, vehicle_disaster_chunk); break;
diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp
index a44bb6960..c749a27e3 100644
--- a/src/saveload/vehicle_sl.cpp
+++ b/src/saveload/vehicle_sl.cpp
@@ -560,7 +560,7 @@ const SaveLoad *GetVehicleDescription(VehicleType vt)
static const SaveLoad _ship_desc[] = {
SLE_WRITEBYTE(Vehicle, type, VEH_SHIP),
SLE_VEH_INCLUDEX(),
- SLE_VARX(cpp_offsetof(Vehicle, u) + cpp_offsetof(VehicleShip, state), SLE_UINT8),
+ SLE_VAR(Ship, state, SLE_UINT8),
/* reserve extra space in savegame here. (currently 16 bytes) */
SLE_CONDNULL(16, 2, SL_MAX_VERSION),