File diff r22429:35339f6d50a5 → r22430:1078625f8a2b
src/saveload/signs_sl.cpp
Show inline comments
 
@@ -51,22 +51,22 @@ static void Load_SIGN()
 
		SlObject(si, _sign_desc);
 
		/* Before version 6.1, signs didn't have owner.
 
		 * Before version 83, invalid signs were determined by si->str == 0.
 
		 * Before version 103, owner could be a bankrupted company.
 
		 *  - we can't use IsValidCompany() now, so this is fixed in AfterLoadGame()
 
		 * All signs that were saved are valid (including those with just 'Sign' and INVALID_OWNER).
 
		 *  - so set owner to OWNER_NONE if needed (signs from pre-version 6.1 would be lost) */
 
		if (IsSavegameVersionBefore(6, 1) || (IsSavegameVersionBefore(83) && si->owner == INVALID_OWNER)) {
 
			si->owner = OWNER_NONE;
 
		}
 

	
 
		/* Signs placed in scenario editor shall now be OWNER_DEITY */
 
		if (IsSavegameVersionBefore(171) && si->owner == OWNER_NONE && _saveload_mode == SLD_LOAD_SCENARIO) {
 
		if (IsSavegameVersionBefore(171) && si->owner == OWNER_NONE && _file_to_saveload.filetype == FT_SCENARIO) {
 
			si->owner = OWNER_DEITY;
 
		}
 
	}
 
}
 

	
 
/** Chunk handlers related to signs. */
 
extern const ChunkHandler _sign_chunk_handlers[] = {
 
	{ 'SIGN', Save_SIGN, Load_SIGN, NULL, NULL, CH_ARRAY | CH_LAST},
 
};