Changeset - r6955:42f59093f6f9
[Not reviewed]
master
0 7 0
rubidium - 17 years ago 2007-06-18 22:49:55
rubidium@openttd.org
(svn r10210) -Codechange: make all money related variables 64 bits, so overflowing them should become a little harder.
7 files changed with 42 insertions and 33 deletions:
0 comments (0 inline, 0 general)
src/economy.cpp
Show inline comments
 
@@ -84,25 +84,25 @@ Money CalculateCompanyValue(const Player
 
					v->type == VEH_ROAD ||
 
					(v->type == VEH_AIRCRAFT && IsNormalAircraft(v)) ||
 
					v->type == VEH_SHIP) {
 
				value.AddCost(v->value * 3 >> 1);
 
			}
 
		}
 
	}
 

	
 
	/* Add real money value */
 
	value.AddCost(-p->current_loan);
 
	value.AddCost(p->player_money);
 

	
 
	return max(value.GetCost(), 1);
 
	return max(value.GetCost(), 1LL);
 
}
 

	
 
/** if update is set to true, the economy is updated with this score
 
 *  (also the house is updated, should only be true in the on-tick event)
 
 * @param update the economy with calculated score
 
 * @param p player been evaluated
 
 * @return actual score of this player
 
 * */
 
int UpdateCompanyRatingAndValue(Player *p, bool update)
 
{
 
	byte owner = p->index;
 
	int score = 0;
 
@@ -1442,25 +1442,25 @@ void VehiclePayment(Vehicle *front_v)
 
				SB(ge->unload_pending, 0, 12, GB(ge->unload_pending, 0, 12) + v->cargo_count);
 

	
 
				virtual_profit_total += virtual_profit;   // accumulate transfer profits for whole vehicle
 
				v->cargo_paid_for = v->cargo_count;       // record how much of the cargo has been paid for to eliminate double counting
 
			}
 
			result |= 2;
 

	
 
			SETBIT(v->vehicle_flags, VF_CARGO_UNLOADING);
 
		}
 
	}
 

	
 
	/* Ensure a negative total is only applied to the vehicle if there is value to reduce. */
 
	front_v->cargo_feeder_share = max(front_v->cargo_feeder_share + total_cargo_feeder_share, 0);
 
	front_v->cargo_feeder_share = max(front_v->cargo_feeder_share + total_cargo_feeder_share, 0LL);
 

	
 
	if (virtual_profit_total > 0) {
 
		ShowFeederIncomeAnimation(front_v->x_pos, front_v->y_pos, front_v->z_pos, virtual_profit_total);
 
	}
 

	
 
	if (route_profit != 0) {
 
		front_v->profit_this_year += total_veh_profit;
 
		SubtractMoneyFromPlayer(-route_profit);
 

	
 
		if (IsLocalPlayer() && !PlayVehicleSound(front_v, VSE_LOAD_UNLOAD)) {
 
			SndPlayVehicleFx(SND_14_CASHTILL, front_v);
 
		}
 
@@ -1911,44 +1911,48 @@ CommandCost CmdBuyCompany(TileIndex tile
 

	
 
	if (!p->is_ai) return CMD_ERROR;
 

	
 
	if (flags & DC_EXEC) {
 
		DoAcquireCompany(p);
 
	}
 
	return CommandCost(p->bankrupt_value);
 
}
 

	
 
/** Prices */
 
static void SaveLoad_PRIC()
 
{
 
	SlArray(&_price,      NUM_PRICES, SLE_INT32);
 
	int vt = CheckSavegameVersion(65) ? (SLE_FILE_I32 | SLE_VAR_I64) : SLE_INT64;
 
	SlArray(&_price,      NUM_PRICES, vt);
 
	SlArray(&_price_frac, NUM_PRICES, SLE_UINT16);
 
}
 

	
 
/** Cargo payment rates */
 
static void SaveLoad_CAPR()
 
{
 
	uint num_cargo = CheckSavegameVersion(55) ? 12 : NUM_CARGO;
 
	SlArray(&_cargo_payment_rates,      num_cargo, SLE_INT32);
 
	int vt = CheckSavegameVersion(65) ? (SLE_FILE_I32 | SLE_VAR_I64) : SLE_INT64;
 
	SlArray(&_cargo_payment_rates,      num_cargo, vt);
 
	SlArray(&_cargo_payment_rates_frac, num_cargo, SLE_UINT16);
 
}
 

	
 
static const SaveLoad _economy_desc[] = {
 
	SLE_VAR(Economy, max_loan,         SLE_INT32),
 
	SLE_VAR(Economy, max_loan_unround, SLE_INT32),
 
	SLE_VAR(Economy, fluct,            SLE_FILE_I16 | SLE_VAR_I32),
 
	SLE_VAR(Economy, interest_rate,    SLE_UINT8),
 
	SLE_VAR(Economy, infl_amount,      SLE_UINT8),
 
	SLE_VAR(Economy, infl_amount_pr,   SLE_UINT8),
 
	SLE_END()
 
	SLE_CONDVAR(Economy, max_loan,         SLE_FILE_I32 | SLE_VAR_I64,  0, 64),
 
	SLE_CONDVAR(Economy, max_loan,         SLE_INT64,                  65, SL_MAX_VERSION),
 
	SLE_CONDVAR(Economy, max_loan_unround, SLE_FILE_I32 | SLE_VAR_I64,  0, 64),
 
	SLE_CONDVAR(Economy, max_loan_unround, SLE_INT64,                  65, SL_MAX_VERSION),
 
	    SLE_VAR(Economy, fluct,            SLE_FILE_I16 | SLE_VAR_I32),
 
	    SLE_VAR(Economy, interest_rate,    SLE_UINT8),
 
	    SLE_VAR(Economy, infl_amount,      SLE_UINT8),
 
	    SLE_VAR(Economy, infl_amount_pr,   SLE_UINT8),
 
	    SLE_END()
 
};
 

	
 
/** Economy variables */
 
static void SaveLoad_ECMY()
 
{
 
	SlObject(&_economy, _economy_desc);
 
}
 

	
 
extern const ChunkHandler _economy_chunk_handlers[] = {
 
	{ 'PRIC', SaveLoad_PRIC, SaveLoad_PRIC, CH_RIFF | CH_AUTO_LENGTH},
 
	{ 'CAPR', SaveLoad_CAPR, SaveLoad_CAPR, CH_RIFF | CH_AUTO_LENGTH},
 
	{ 'SUBS', Save_SUBS,     Load_SUBS,     CH_ARRAY},
src/openttd.h
Show inline comments
 
@@ -60,25 +60,25 @@ typedef EngineID *EngineList; ///< engin
 
typedef uint16 VehicleID;
 
typedef uint16 StationID;
 
typedef uint16 RoadStopID;
 
typedef uint16 TownID;
 
typedef uint16 IndustryID;
 
typedef uint16 DepotID;
 
typedef uint16 WaypointID;
 
typedef uint16 OrderID;
 
typedef uint16 SignID;
 
typedef uint16 GroupID;
 
typedef uint16 EngineRenewID;
 
typedef uint16 DestinationID;
 
typedef int32 Money;
 
typedef int64 Money;
 

	
 
/* DestinationID must be at least as large as every these below, because it can
 
 * be any of them
 
 */
 
assert_compile(sizeof(DestinationID) == sizeof(DepotID));
 
assert_compile(sizeof(DestinationID) == sizeof(WaypointID));
 
assert_compile(sizeof(DestinationID) == sizeof(StationID));
 

	
 
typedef int32 WindowNumber;
 

	
 
enum {
 
	INVALID_YEAR = -1,
 
@@ -377,26 +377,24 @@ public:
 
	CommandCost() : cost(0), message(INVALID_STRING_ID), success(true) {}
 

	
 
	/**
 
	 * Creates a command return value the is failed with the given message
 
	 */
 
	CommandCost(StringID msg) : cost(0), message(msg), success(false) {}
 

	
 
	/**
 
	 * Creates a command return value with the given start cost
 
	 * @param cst the initial cost of this command
 
	 */
 
	CommandCost(Money cst) : cost(cst), message(INVALID_STRING_ID), success(true) {}
 
	/** "Hack" to make everything compile nicely, not needed when cost is int64 */
 
	CommandCost(uint cst) : cost(cst), message(INVALID_STRING_ID), success(true) {}
 

	
 
	/**
 
	 * Adds the cost of the given command return value to this cost.
 
	 * Also takes a possible error message when it is set.
 
	 * @param ret the command to add the cost of.
 
	 * @return this class.
 
	 */
 
	CommandCost AddCost(CommandCost ret);
 

	
 
	/**
 
	 * Adds the given cost to the cost of the command.
 
	 * @param cost the cost to add
src/player.h
Show inline comments
 
@@ -7,25 +7,25 @@
 

	
 
#include "oldpool.h"
 
#include "aystar.h"
 
#include "rail.h"
 
#include "engine.h"
 
#include "livery.h"
 

	
 
struct PlayerEconomyEntry {
 
	Money income;
 
	Money expenses;
 
	int32 delivered_cargo;
 
	int32 performance_history; ///< player score (scale 0-1000)
 
	int64 company_value;
 
	Money company_value;
 
};
 

	
 
struct AiBuildRec {
 
	TileIndex spec_tile;
 
	TileIndex use_tile;
 
	byte rand_rng;
 
	byte cur_building_rule;
 
	byte unk6;
 
	byte unk7;
 
	byte buildcmd_a;
 
	byte buildcmd_b;
 
	byte direction;
 
@@ -157,25 +157,25 @@ enum {
 

	
 
typedef uint32 PlayerFace;
 

	
 
struct Player {
 
	uint32 name_2;
 
	uint16 name_1;
 

	
 
	uint16 president_name_1;
 
	uint32 president_name_2;
 

	
 
	PlayerFace face;
 

	
 
	int64 player_money;
 
	Money player_money;
 
	Money current_loan;
 

	
 
	byte player_color;
 
	Livery livery[LS_END];
 
	byte player_money_fraction;
 
	byte avail_railtypes;
 
	byte avail_roadtypes;
 
	byte block_preview;
 
	PlayerByte index;
 

	
 
	uint16 cargo_types; ///< which cargo types were transported the last year
 

	
 
@@ -188,25 +188,25 @@ struct Player {
 
	byte num_valid_stat_ent;
 

	
 
	byte quarters_of_bankrupcy;
 
	byte bankrupt_asked; ///< which players were asked about buying it?
 
	int16 bankrupt_timeout;
 
	Money bankrupt_value;
 

	
 
	bool is_active;
 
	bool is_ai;
 
	PlayerAI ai;
 
	PlayerAiNew ainew;
 

	
 
	int64 yearly_expenses[3][13];
 
	Money yearly_expenses[3][13];
 
	PlayerEconomyEntry cur_economy;
 
	PlayerEconomyEntry old_economy[24];
 
	EngineRenewList engine_renew_list; ///< Defined later
 
	bool engine_renew;
 
	bool renew_keep_length;
 
	int16 engine_renew_months;
 
	uint32 engine_renew_money;
 
	uint16 num_engines[TOTAL_NUM_ENGINES]; ///< caches the number of engines of each type the player owns (no need to save this)
 
};
 

	
 
uint16 GetDrawStringPlayerColor(PlayerID player);
 

	
src/players.cpp
Show inline comments
 
@@ -179,29 +179,29 @@ bool CheckPlayerHasMoney(CommandCost cos
 
		PlayerID pid = _current_player;
 
		if (IsValidPlayer(pid) && cost.GetCost() > GetPlayer(pid)->player_money) {
 
			SetDParam(0, cost.GetCost());
 
			_error_message = STR_0003_NOT_ENOUGH_CASH_REQUIRES;
 
			return false;
 
		}
 
	}
 
	return true;
 
}
 

	
 
static void SubtractMoneyFromAnyPlayer(Player *p, CommandCost cost)
 
{
 
	CommandCost tmp((int32)p->player_money);
 
	CommandCost tmp(p->player_money);
 
	tmp.AddCost(-cost.GetCost());
 
	p->player_money = tmp.GetCost();
 

	
 
	tmp = CommandCost((int32)p->yearly_expenses[0][_yearly_expenses_type]);
 
	tmp = CommandCost(p->yearly_expenses[0][_yearly_expenses_type]);
 
	tmp.AddCost(cost);
 
	p->yearly_expenses[0][_yearly_expenses_type] = tmp.GetCost();
 

	
 
	if (HASBIT(1 << EXPENSES_TRAIN_INC    |
 
	           1 << EXPENSES_ROADVEH_INC  |
 
	           1 << EXPENSES_AIRCRAFT_INC |
 
	           1 << EXPENSES_SHIP_INC, _yearly_expenses_type)) {
 
		tmp = CommandCost(p->cur_economy.income);
 
		tmp.AddCost(-cost.GetCost());
 
		p->cur_economy.income = tmp.GetCost();
 
	} else if (HASBIT(1 << EXPENSES_TRAIN_RUN    |
 
	                  1 << EXPENSES_ROADVEH_RUN  |
 
@@ -1121,79 +1121,81 @@ void LoadFromHighScore()
 

	
 
/* Save/load of players */
 
static const SaveLoad _player_desc[] = {
 
	    SLE_VAR(Player, name_2,          SLE_UINT32),
 
	    SLE_VAR(Player, name_1,          SLE_STRINGID),
 

	
 
	    SLE_VAR(Player, president_name_1,SLE_UINT16),
 
	    SLE_VAR(Player, president_name_2,SLE_UINT32),
 

	
 
	    SLE_VAR(Player, face,            SLE_UINT32),
 

	
 
	/* money was changed to a 64 bit field in savegame version 1. */
 
	SLE_CONDVAR(Player, player_money,          SLE_VAR_I64 | SLE_FILE_I32, 0, 0),
 
	SLE_CONDVAR(Player, player_money,          SLE_INT64, 1, SL_MAX_VERSION),
 
	SLE_CONDVAR(Player, player_money,          SLE_VAR_I64 | SLE_FILE_I32,  0, 0),
 
	SLE_CONDVAR(Player, player_money,          SLE_INT64,                   1, SL_MAX_VERSION),
 

	
 
	    SLE_VAR(Player, current_loan,          SLE_INT32),
 
	SLE_CONDVAR(Player, current_loan,          SLE_VAR_I64 | SLE_FILE_I32,  0, 64),
 
	SLE_CONDVAR(Player, current_loan,          SLE_INT64,                  65, SL_MAX_VERSION),
 

	
 
	    SLE_VAR(Player, player_color,          SLE_UINT8),
 
	    SLE_VAR(Player, player_money_fraction, SLE_UINT8),
 
	SLE_CONDVAR(Player, avail_railtypes,       SLE_UINT8,                   0, 57),
 
	    SLE_VAR(Player, block_preview,         SLE_UINT8),
 

	
 
	    SLE_VAR(Player, cargo_types,           SLE_UINT16),
 
	SLE_CONDVAR(Player, location_of_house,     SLE_FILE_U16 | SLE_VAR_U32,  0,  5),
 
	SLE_CONDVAR(Player, location_of_house,     SLE_UINT32,                  6, SL_MAX_VERSION),
 
	SLE_CONDVAR(Player, last_build_coordinate, SLE_FILE_U16 | SLE_VAR_U32,  0,  5),
 
	SLE_CONDVAR(Player, last_build_coordinate, SLE_UINT32,                  6, SL_MAX_VERSION),
 
	SLE_CONDVAR(Player, inaugurated_year,      SLE_FILE_U8  | SLE_VAR_I32,  0, 30),
 
	SLE_CONDVAR(Player, inaugurated_year,      SLE_INT32,                  31, SL_MAX_VERSION),
 

	
 
	    SLE_ARR(Player, share_owners,          SLE_UINT8, 4),
 

	
 
	    SLE_VAR(Player, num_valid_stat_ent,    SLE_UINT8),
 

	
 
	    SLE_VAR(Player, quarters_of_bankrupcy, SLE_UINT8),
 
	    SLE_VAR(Player, bankrupt_asked,        SLE_UINT8),
 
	    SLE_VAR(Player, bankrupt_timeout,      SLE_INT16),
 
	    SLE_VAR(Player, bankrupt_value,        SLE_INT32),
 
	SLE_CONDVAR(Player, bankrupt_value,        SLE_VAR_I64 | SLE_FILE_I32,  0, 64),
 
	SLE_CONDVAR(Player, bankrupt_value,        SLE_INT64,                  65, SL_MAX_VERSION),
 

	
 
	/* yearly expenses was changed to 64-bit in savegame version 2. */
 
	SLE_CONDARR(Player, yearly_expenses,       SLE_FILE_I32 | SLE_VAR_I64, 3 * 13, 0, 1),
 
	SLE_CONDARR(Player, yearly_expenses,       SLE_INT64, 3 * 13,                  2, SL_MAX_VERSION),
 

	
 
	SLE_CONDVAR(Player, is_ai,                 SLE_BOOL, 2, SL_MAX_VERSION),
 
	SLE_CONDVAR(Player, is_active,             SLE_BOOL, 4, SL_MAX_VERSION),
 

	
 
	/* Engine renewal settings */
 
	SLE_CONDNULL(512, 16, 18),
 
	SLE_CONDREF(Player, engine_renew_list,     REF_ENGINE_RENEWS,          19, SL_MAX_VERSION),
 
	SLE_CONDVAR(Player, engine_renew,          SLE_BOOL,                   16, SL_MAX_VERSION),
 
	SLE_CONDVAR(Player, engine_renew_months,   SLE_INT16,                  16, SL_MAX_VERSION),
 
	SLE_CONDVAR(Player, engine_renew_money,    SLE_UINT32,                 16, SL_MAX_VERSION),
 
	SLE_CONDVAR(Player, renew_keep_length,     SLE_BOOL,                    2, SL_MAX_VERSION), // added with 16.1, but was blank since 2
 

	
 
	/* reserve extra space in savegame here. (currently 63 bytes) */
 
	SLE_CONDNULL(63, 2, SL_MAX_VERSION),
 

	
 
	SLE_END()
 
};
 

	
 
static const SaveLoad _player_economy_desc[] = {
 
	/* these were changed to 64-bit in savegame format 2 */
 
	SLE_CONDVAR(PlayerEconomyEntry, income,              SLE_INT32,                  0, 1),
 
	SLE_CONDVAR(PlayerEconomyEntry, expenses,            SLE_INT32,                  0, 1),
 
	SLE_CONDVAR(PlayerEconomyEntry, income,              SLE_FILE_I32 | SLE_VAR_I64, 0, 1),
 
	SLE_CONDVAR(PlayerEconomyEntry, income,              SLE_INT64,                  2, SL_MAX_VERSION),
 
	SLE_CONDVAR(PlayerEconomyEntry, expenses,            SLE_FILE_I32 | SLE_VAR_I64, 0, 1),
 
	SLE_CONDVAR(PlayerEconomyEntry, expenses,            SLE_INT64,                  2, SL_MAX_VERSION),
 
	SLE_CONDVAR(PlayerEconomyEntry, company_value,       SLE_FILE_I32 | SLE_VAR_I64, 0, 1),
 
	SLE_CONDVAR(PlayerEconomyEntry, income,              SLE_FILE_I64 | SLE_VAR_I32, 2, SL_MAX_VERSION),
 
	SLE_CONDVAR(PlayerEconomyEntry, expenses,            SLE_FILE_I64 | SLE_VAR_I32, 2, SL_MAX_VERSION),
 
	SLE_CONDVAR(PlayerEconomyEntry, company_value,       SLE_INT64,                  2, SL_MAX_VERSION),
 

	
 
	    SLE_VAR(PlayerEconomyEntry, delivered_cargo,     SLE_INT32),
 
	    SLE_VAR(PlayerEconomyEntry, performance_history, SLE_INT32),
 

	
 
	SLE_END()
 
};
 

	
 
static const SaveLoad _player_ai_desc[] = {
 
	    SLE_VAR(PlayerAI, state,             SLE_UINT8),
 
	    SLE_VAR(PlayerAI, tick,              SLE_UINT8),
 
	SLE_CONDVAR(PlayerAI, state_counter,     SLE_FILE_U16 | SLE_VAR_U32,  0, 12),
src/saveload.cpp
Show inline comments
 
@@ -20,25 +20,25 @@
 
#include "hal.h"
 
#include "vehicle.h"
 
#include "station.h"
 
#include "thread.h"
 
#include "town.h"
 
#include "player.h"
 
#include "saveload.h"
 
#include "network/network.h"
 
#include "variables.h"
 
#include <setjmp.h>
 
#include <list>
 

	
 
extern const uint16 SAVEGAME_VERSION = 64;
 
extern const uint16 SAVEGAME_VERSION = 65;
 
uint16 _sl_version;       ///< the major savegame version identifier
 
byte   _sl_minor_version; ///< the minor savegame version, DO NOT USE!
 

	
 
typedef void WriterProc(uint len);
 
typedef uint ReaderProc();
 

	
 
/** The saveload struct, containing reader-writer functions, bufffer, version, etc. */
 
static struct {
 
	bool save;                           ///< are we doing a save or a load atm. True when saving
 
	byte need_length;                    ///< ???
 
	byte block_mode;                     ///< ???
 
	bool error;                          ///< did an error occur or not
src/station_cmd.cpp
Show inline comments
 
@@ -2908,25 +2908,26 @@ static const SaveLoad _station_desc[] = 
 

	
 
static const SaveLoad _goods_desc[] = {
 
	    SLE_VAR(GoodsEntry, waiting_acceptance, SLE_UINT16),
 
	SLE_CONDVAR(GoodsEntry, unload_pending,     SLE_UINT16,                51, SL_MAX_VERSION),
 
	    SLE_VAR(GoodsEntry, days_since_pickup,  SLE_UINT8),
 
	    SLE_VAR(GoodsEntry, rating,             SLE_UINT8),
 
	SLE_CONDVAR(GoodsEntry, enroute_from,       SLE_FILE_U8 | SLE_VAR_U16,  0, 6),
 
	SLE_CONDVAR(GoodsEntry, enroute_from,       SLE_UINT16,                 7, SL_MAX_VERSION),
 
	SLE_CONDVAR(GoodsEntry, enroute_from_xy,    SLE_UINT32,                44, SL_MAX_VERSION),
 
	    SLE_VAR(GoodsEntry, enroute_time,       SLE_UINT8),
 
	    SLE_VAR(GoodsEntry, last_speed,         SLE_UINT8),
 
	    SLE_VAR(GoodsEntry, last_age,           SLE_UINT8),
 
	SLE_CONDVAR(GoodsEntry, feeder_profit,      SLE_INT32,                 14, SL_MAX_VERSION),
 
	SLE_CONDVAR(GoodsEntry, feeder_profit,      SLE_FILE_I32 | SLE_VAR_I64,14, 64),
 
	SLE_CONDVAR(GoodsEntry, feeder_profit,      SLE_INT64,                 65, SL_MAX_VERSION),
 

	
 
	SLE_END()
 
};
 

	
 
static const SaveLoad _station_speclist_desc[] = {
 
	SLE_CONDVAR(StationSpecList, grfid,    SLE_UINT32, 27, SL_MAX_VERSION),
 
	SLE_CONDVAR(StationSpecList, localidx, SLE_UINT8,  27, SL_MAX_VERSION),
 

	
 
	SLE_END()
 
};
 

	
 

	
src/vehicle.cpp
Show inline comments
 
@@ -2801,29 +2801,33 @@ extern const SaveLoad _common_veh_desc[]
 
	    SLE_VAR(Vehicle, reliability_spd_dec,  SLE_UINT16),
 
	    SLE_VAR(Vehicle, breakdown_ctr,        SLE_UINT8),
 
	    SLE_VAR(Vehicle, breakdown_delay,      SLE_UINT8),
 
	    SLE_VAR(Vehicle, breakdowns_since_last_service, SLE_UINT8),
 
	    SLE_VAR(Vehicle, breakdown_chance,     SLE_UINT8),
 
	SLE_CONDVAR(Vehicle, build_year,           SLE_FILE_U8 | SLE_VAR_I32,  0, 30),
 
	SLE_CONDVAR(Vehicle, build_year,           SLE_INT32,                 31, SL_MAX_VERSION),
 

	
 
	    SLE_VAR(Vehicle, load_unload_time_rem, SLE_UINT16),
 
	SLE_CONDVAR(Vehicle, cargo_paid_for,       SLE_UINT16,                45, SL_MAX_VERSION),
 
	SLE_CONDVAR(Vehicle, vehicle_flags,        SLE_UINT8,                 40, SL_MAX_VERSION),
 

	
 
	    SLE_VAR(Vehicle, profit_this_year,     SLE_INT32),
 
	    SLE_VAR(Vehicle, profit_last_year,     SLE_INT32),
 
	SLE_CONDVAR(Vehicle, cargo_feeder_share,   SLE_INT32,                 51, SL_MAX_VERSION),
 
	SLE_CONDVAR(Vehicle, profit_this_year,     SLE_FILE_I32 | SLE_VAR_I64, 0, 64),
 
	SLE_CONDVAR(Vehicle, profit_this_year,     SLE_INT64,                 65, SL_MAX_VERSION),
 
	SLE_CONDVAR(Vehicle, profit_last_year,     SLE_FILE_I32 | SLE_VAR_I64, 0, 64),
 
	SLE_CONDVAR(Vehicle, profit_last_year,     SLE_INT64,                 65, SL_MAX_VERSION),
 
	SLE_CONDVAR(Vehicle, cargo_feeder_share,   SLE_FILE_I32 | SLE_VAR_I64,51, 64),
 
	SLE_CONDVAR(Vehicle, cargo_feeder_share,   SLE_INT64,                 65, SL_MAX_VERSION),
 
	SLE_CONDVAR(Vehicle, cargo_loaded_at_xy,   SLE_UINT32,                51, SL_MAX_VERSION),
 
	    SLE_VAR(Vehicle, value,                SLE_UINT32),
 
	SLE_CONDVAR(Vehicle, value,                SLE_FILE_I32 | SLE_VAR_I64, 0, 64),
 
	SLE_CONDVAR(Vehicle, value,                SLE_INT64,                 65, SL_MAX_VERSION),
 

	
 
	    SLE_VAR(Vehicle, random_bits,          SLE_UINT8),
 
	    SLE_VAR(Vehicle, waiting_triggers,     SLE_UINT8),
 

	
 
	    SLE_REF(Vehicle, next_shared,          REF_VEHICLE),
 
	    SLE_REF(Vehicle, prev_shared,          REF_VEHICLE),
 

	
 
	SLE_CONDVAR(Vehicle, group_id,             SLE_UINT16,                60, SL_MAX_VERSION),
 

	
 
	/* reserve extra space in savegame here. (currently 10 bytes) */
 
	SLE_CONDNULL(10,                                                       2, SL_MAX_VERSION),
 

	
0 comments (0 inline, 0 general)