Changeset - r19762:92e803d6d7ef
[Not reviewed]
master
0 1 0
frosch - 12 years ago 2012-11-12 20:14:08
frosch@openttd.org
(svn r24717) -Fix [FS#5139]: When starting a scenario apply the local company settings to the new company.
1 file changed with 2 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/saveload/afterload.cpp
Show inline comments
 
@@ -708,24 +708,26 @@ bool AfterLoadGame()
 
	/* The void tiles on the southern border used to belong to a wrong class (pre 4.3).
 
	 * This problem appears in savegame version 21 too, see r3455. But after loading the
 
	 * savegame and saving again, the buggy map array could be converted to new savegame
 
	 * version. It didn't show up before r12070. */
 
	if (IsSavegameVersionBefore(87)) UpdateVoidTiles();
 

	
 
	/* If Load Scenario / New (Scenario) Game is used,
 
	 *  a company does not exist yet. So create one here.
 
	 * 1 exeption: network-games. Those can have 0 companies
 
	 *   But this exeption is not true for non dedicated network_servers! */
 
	if (!Company::IsValidID(COMPANY_FIRST) && (!_networking || (_networking && _network_server && !_network_dedicated))) {
 
		DoStartupNewCompany(false);
 
		Company *c = Company::Get(COMPANY_FIRST);
 
		c->settings = _settings_client.company;
 
	}
 

	
 
	/* Fix the cache for cargo payments. */
 
	CargoPayment *cp;
 
	FOR_ALL_CARGO_PAYMENTS(cp) {
 
		cp->front->cargo_payment = cp;
 
		cp->current_station = cp->front->last_station_visited;
 
	}
 

	
 
	if (IsSavegameVersionBefore(72)) {
 
		/* Locks in very old savegames had OWNER_WATER as owner */
 
		for (TileIndex t = 0; t < MapSize(); t++) {
0 comments (0 inline, 0 general)