diff options
author | rubidium <rubidium@openttd.org> | 2009-05-22 22:33:05 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-05-22 22:33:05 +0000 |
commit | c4b627af422075ce4a0e1026c52f871dd3f146c0 (patch) | |
tree | febaea249dc307b4b619aeff09e353677bbbcd84 /src/saveload/oldloader_sl.cpp | |
parent | 80e94b9bb15f846189e98f1f457afe2b96ba2b58 (diff) | |
download | openttd-c4b627af422075ce4a0e1026c52f871dd3f146c0.tar.xz |
(svn r16392) -Codechange: move some variables (the ones that aren't caches) from VehicleRail to Train
Diffstat (limited to 'src/saveload/oldloader_sl.cpp')
-rw-r--r-- | src/saveload/oldloader_sl.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp index e95748807..080ea6c90 100644 --- a/src/saveload/oldloader_sl.cpp +++ b/src/saveload/oldloader_sl.cpp @@ -1079,10 +1079,10 @@ static uint16 _old_next_ptr; static VehicleID _current_vehicle_id; static const OldChunks vehicle_train_chunk[] = { - OCL_SVAR( OC_UINT8, VehicleRail, track ), - OCL_SVAR( OC_UINT8, VehicleRail, force_proceed ), - OCL_SVAR( OC_UINT16, VehicleRail, crash_anim_pos ), - OCL_SVAR( OC_UINT8, VehicleRail, railtype ), + OCL_SVAR( OC_UINT8, Train, track ), + OCL_SVAR( OC_UINT8, Train, force_proceed ), + OCL_SVAR( OC_UINT16, Train, crash_anim_pos ), + OCL_SVAR( OC_UINT8, Train, railtype ), OCL_NULL( 5 ), ///< Junk @@ -1157,7 +1157,7 @@ static bool LoadOldVehicleUnion(LoadgameState *ls, int num) } else { switch (v->type) { default: NOT_REACHED(); - case VEH_TRAIN : res = LoadChunk(ls, &v->u.rail, vehicle_train_chunk); break; + case VEH_TRAIN : res = LoadChunk(ls, v, vehicle_train_chunk); break; case VEH_ROAD : res = LoadChunk(ls, v, vehicle_road_chunk); break; case VEH_SHIP : res = LoadChunk(ls, v, vehicle_ship_chunk); break; case VEH_AIRCRAFT: res = LoadChunk(ls, v, vehicle_air_chunk); break; @@ -1315,7 +1315,7 @@ bool LoadOldVehicle(LoadgameState *ls, int num) }; if (v->spritenum / 2 >= lengthof(spriteset_rail)) return false; v->spritenum = spriteset_rail[v->spritenum / 2]; // adjust railway sprite set offset - ((Train *)v)->u.rail.railtype = type == 0x25 ? 1 : 0; // monorail / rail + ((Train *)v)->railtype = type == 0x25 ? 1 : 0; // monorail / rail break; } |