summaryrefslogtreecommitdiff
path: root/vehicle.c
diff options
context:
space:
mode:
authorhackykid <hackykid@openttd.org>2005-07-17 20:09:02 +0000
committerhackykid <hackykid@openttd.org>2005-07-17 20:09:02 +0000
commit1d11bbb34da6bb1cfd8d8351f61940c92027ed55 (patch)
tree2aa47a2f10516c02b42213645730108be6987d02 /vehicle.c
parenteabc48218413f5d3e9e26d3675e32055af8cfc61 (diff)
downloadopenttd-1d11bbb34da6bb1cfd8d8351f61940c92027ed55.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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/vehicle.c b/vehicle.c
index 6eae858ed..9d4580c67 100644
--- a/vehicle.c
+++ b/vehicle.c
@@ -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()
};