Changeset - r22866:31c85ef6ecbd
[Not reviewed]
master
0 3 0
PeterN - 6 years ago 2018-05-19 21:31:46
peter@fuzzle.org
Change: Available railtypes is always calculated on load, so no need to load value for old savegames (#6782)
3 files changed with 3 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/company_base.h
Show inline comments
 
@@ -67,8 +67,6 @@ struct CompanyProperties {
 

	
 
	byte colour;                     ///< Company colour.
 

	
 
	RailTypes avail_railtypes;       ///< Rail types available to the company.
 

	
 
	byte block_preview;              ///< Number of quarters that the company is not allowed to get new exclusive engine previews (see CompaniesGenStatistics).
 

	
 
	TileIndex location_of_HQ;        ///< Northern tile of HQ; #INVALID_TILE when there is none.
 
@@ -112,6 +110,7 @@ struct Company : CompanyPool::PoolItem<&
 
	~Company();
 

	
 
	Livery livery[LS_END];
 
	RailTypes avail_railtypes;         ///< Rail types available to this company.
 
	RoadTypes avail_roadtypes;         ///< Road types available to this company.
 

	
 
	class AIInstance *ai_instance;
src/saveload/company_sl.cpp
Show inline comments
 
@@ -259,7 +259,7 @@ static const SaveLoad _company_desc[] = 
 

	
 
	    SLE_VAR(CompanyProperties, colour,                SLE_UINT8),
 
	    SLE_VAR(CompanyProperties, money_fraction,        SLE_UINT8),
 
	SLE_CONDVAR(CompanyProperties, avail_railtypes,       SLE_VAR_I32 | SLE_FILE_I8,   0, 57),
 
	SLE_CONDNULL(1,  0,  57), ///< avail_railtypes
 
	    SLE_VAR(CompanyProperties, block_preview,         SLE_UINT8),
 

	
 
	SLE_CONDNULL(2,  0,  93), ///< cargo_types
src/saveload/oldloader_sl.cpp
Show inline comments
 
@@ -946,7 +946,7 @@ static const OldChunks _company_chunk[] 
 

	
 
	OCL_SVAR(  OC_UINT8, Company, block_preview ),
 
	OCL_CNULL( OC_TTD, 1 ),           // Old AI
 
	OCL_SVAR( OC_TTD | OC_UINT8, Company, avail_railtypes ),
 
	OCL_CNULL( OC_TTD, 1 ), // avail_railtypes
 
	OCL_SVAR(   OC_TILE, Company, location_of_HQ ),
 
	OCL_SVAR( OC_TTD | OC_UINT8, Company, share_owners[0] ),
 
	OCL_SVAR( OC_TTD | OC_UINT8, Company, share_owners[1] ),
0 comments (0 inline, 0 general)