Index: station_cmd.c =================================================================== --- station_cmd.c (revision 4150) +++ station_cmd.c (working copy) @@ -449,7 +449,7 @@ st->delete_ctr = 0; st->facilities = 0; - st->last_vehicle = INVALID_VEHICLE; + st->last_vehicle_type = VEH_Invalid; for (ge = st->goods; ge != endof(st->goods); ge++) { ge->waiting_acceptance = 0; @@ -2332,8 +2332,7 @@ { byte days = ge->days_since_pickup; - if (st->last_vehicle != INVALID_VEHICLE && - GetVehicle(st->last_vehicle)->type == VEH_Ship) + if (st->last_vehicle_type == VEH_Ship) days >>= 2; (days > 21) || (rating += 25, days > 12) || @@ -2659,7 +2658,7 @@ st->time_since_load = 255; st->time_since_unload = 255; st->delete_ctr = 0; - st->last_vehicle = INVALID_VEHICLE; + st->last_vehicle_type = VEH_Invalid; st->facilities = FACIL_AIRPORT | FACIL_DOCK; st->build_date = _date; @@ -2831,7 +2830,8 @@ SLE_CONDVAR(Station,airport_flags, SLE_VAR_U32 | SLE_FILE_U16, 0, 2), SLE_CONDVAR(Station,airport_flags, SLE_UINT32, 3, SL_MAX_VERSION), - SLE_VAR(Station,last_vehicle, SLE_UINT16), + SLE_CONDNULL(2, 0, 24), /* Ex last-vehicle */ + SLE_CONDVAR(Station,last_vehicle_type, SLE_UINT8 , 25, SL_MAX_VERSION), SLE_CONDVAR(Station,class_id, SLE_UINT8, 3, SL_MAX_VERSION), SLE_CONDVAR(Station,stat_id, SLE_UINT8, 3, SL_MAX_VERSION), Index: oldloader.c =================================================================== --- oldloader.c (revision 4150) +++ oldloader.c (working copy) @@ -682,7 +682,7 @@ OCL_SVAR( OC_UINT8, Station, blocked_months_obsolete ), OCL_NULL( 1 ), // Unknown OCL_SVAR( OC_FILE_U16 | OC_VAR_U32, Station, airport_flags ), - OCL_SVAR( OC_UINT16, Station, last_vehicle ), + OCL_NULL( 2 ), // last_vehicle. now last_vehicle_type OCL_NULL( 4 ), // Junk at end of chunk Index: openttd.c =================================================================== --- openttd.c (revision 4150) +++ openttd.c (working copy) @@ -1386,6 +1386,13 @@ if (CheckSavegameVersion(22)) UpdatePatches(); + if (CheckSavegameVersion(25)) { + Station *st; + FOR_ALL_STATIONS(st) { + st->last_vehicle_type = VEH_Invalid; + } + } + FOR_ALL_PLAYERS(p) p->avail_railtypes = GetPlayerRailtypes(p->index); return true; Index: saveload.c =================================================================== --- saveload.c (revision 4150) +++ saveload.c (working copy) @@ -30,7 +30,7 @@ #include "variables.h" #include -const uint16 SAVEGAME_VERSION = 24; +const uint16 SAVEGAME_VERSION = 25; uint16 _sl_version; /// the major savegame version identifier byte _sl_minor_version; /// the minor savegame version, DO NOT USE! Index: vehicle.h =================================================================== --- vehicle.h (revision 4150) +++ vehicle.h (working copy) @@ -8,12 +8,13 @@ #include "rail.h" enum { + VEH_Invalid = 0, VEH_Train = 0x10, VEH_Road = 0x11, VEH_Ship = 0x12, VEH_Aircraft = 0x13, VEH_Special = 0x14, - VEH_Disaster = 0x15, + VEH_Disaster = 0x15 } ; enum VehStatus { Index: economy.c =================================================================== --- economy.c (revision 4150) +++ economy.c (working copy) @@ -1463,7 +1463,7 @@ v->cargo_source = ge->enroute_from; v->cargo_days = ge->enroute_time; result |= 2; - st->last_vehicle = v->index; + st->last_vehicle_type = v->type; } } Index: station.h =================================================================== --- station.h (revision 4150) +++ station.h (working copy) @@ -76,7 +76,7 @@ uint32 airport_flags; StationID index; - VehicleID last_vehicle; + byte last_vehicle_type; GoodsEntry goods[NUM_CARGO]; /* Stuff that is no longer used, but needed for conversion */