Changeset - r10106:053c1b944d2e
[Not reviewed]
master
0 1 0
smatz - 16 years ago 2008-09-11 17:41:43
smatz@openttd.org
(svn r14290) -Fix (r13932): level crossings could be barred when they shouldn't be after savegame conversion
1 file changed with 8 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/openttd.cpp
Show inline comments
 
@@ -2339,15 +2339,12 @@ bool AfterLoadGame()
 
			}
 
		}
 
	}
 

	
 
	if (CheckSavegameVersion(86)) {
 
		for (TileIndex t = 0; t < map_size; t++) {
 
			/* Now all crossings should be in correct state */
 
			if (IsLevelCrossingTile(t)) UpdateLevelCrossing(t, false);
 

	
 
			/* Move river flag and update canals to use water class */
 
			if (IsTileType(t, MP_WATER)) {
 
				if (GetWaterClass(t) != WATER_CLASS_RIVER) {
 
					if (IsWater(t)) {
 
						Owner o = GetTileOwner(t);
 
						if (o == OWNER_WATER) {
 
@@ -2542,12 +2539,20 @@ bool AfterLoadGame()
 
		FOR_ALL_WAYPOINTS(wp) {
 
			Owner owner = (IsRailWaypointTile(wp->xy) ? GetTileOwner(wp->xy) : OWNER_NONE);
 
			wp->owner = IsValidPlayerID(owner) ? owner : OWNER_NONE;
 
		}
 
	}
 

	
 
	if (CheckSavegameVersion(102)) {
 
		for (TileIndex t = 0; t < map_size; t++) {
 
			/* Now all crossings should be in correct state */
 
			if (IsLevelCrossingTile(t)) UpdateLevelCrossing(t, false);
 
		}
 
	}
 

	
 

	
 
	GamelogPrintDebug(1);
 

	
 
	return InitializeWindowsAndCaches();
 
}
 

	
 
/** Reload all NewGRF files during a running game. This is a cut-down
0 comments (0 inline, 0 general)