(svn r11004) -Codechange: some reworks of the saveload mechanism to be able to save and load private and protected variables in the vehicle struct.
This commit is contained in:
@@ -218,11 +218,18 @@ struct VehicleShip {
|
||||
struct Vehicle;
|
||||
DECLARE_OLD_POOL(Vehicle, Vehicle, 9, 125)
|
||||
|
||||
struct SaveLoad;
|
||||
extern const SaveLoad *GetVehicleDescription(VehicleType vt);
|
||||
|
||||
struct Vehicle : PoolItem<Vehicle, VehicleID, &_Vehicle_pool> {
|
||||
VehicleTypeByte type; ///< Type of vehicle
|
||||
byte subtype; // subtype (Filled with values from EffectVehicles/TrainSubTypes/AircraftSubTypes)
|
||||
|
||||
private:
|
||||
Vehicle *next; // pointer to the next vehicle in the chain
|
||||
public:
|
||||
friend const SaveLoad *GetVehicleDescription(VehicleType vt); // So we can use private/protected variables in the saveload code
|
||||
|
||||
Vehicle *first; // NOSAVE: pointer to the first vehicle in the chain
|
||||
Vehicle *depot_list; // NOSAVE: linked list to tell what vehicles entered a depot during the last tick. Used by autoreplace
|
||||
|
||||
|
||||
Reference in New Issue
Block a user