diff options
author | hackykid <hackykid@openttd.org> | 2005-07-17 20:09:02 +0000 |
---|---|---|
committer | hackykid <hackykid@openttd.org> | 2005-07-17 20:09:02 +0000 |
commit | 552aa1b4dc172a9d769e3c94ff40c99743f428b0 (patch) | |
tree | 2aa47a2f10516c02b42213645730108be6987d02 /vehicle.c | |
parent | 09195e0bda3bcec67f306f4e12edde50db90e602 (diff) | |
download | openttd-552aa1b4dc172a9d769e3c94ff40c99743f428b0.tar.xz |
(svn r2625) - Fix: [pbs] Store the end of a train's reserved path explicitly. Prevents trains from unreserving eachothers paths in some cases.
- CodeChange: Use the TrackdirToTrack function instead of &7, and remove an unneeded variable.
Diffstat (limited to 'vehicle.c')
-rw-r--r-- | vehicle.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1947,8 +1947,10 @@ static const SaveLoad _train_desc[] = { SLE_CONDVARX(offsetof(Vehicle,u)+offsetof(VehicleRail,days_since_order_progr), SLE_UINT16, 2, 255), SLE_CONDVARX(offsetof(Vehicle,u)+offsetof(VehicleRail,pbs_status), SLE_UINT8, 2, 255), - // reserve extra space in savegame here. (currently 12 bytes) - SLE_CONDARR(NullStruct,null,SLE_FILE_U8 | SLE_VAR_NULL, 12, 2, 255), + SLE_CONDVARX(offsetof(Vehicle,u)+offsetof(VehicleRail,pbs_end_tile), SLE_UINT32, 2, 255), + SLE_CONDVARX(offsetof(Vehicle,u)+offsetof(VehicleRail,pbs_end_trackdir), SLE_UINT8, 2, 255), + // reserve extra space in savegame here. (currently 7 bytes) + SLE_CONDARR(NullStruct,null,SLE_FILE_U8 | SLE_VAR_NULL, 7, 2, 255), SLE_END() }; |