Changeset - r15915:c6bb7afcdb7b
[Not reviewed]
master
0 1 0
frosch - 14 years ago 2010-08-24 16:15:42
frosch@openttd.org
(svn r20610) -Fix (r20609): X and Y got swapped.
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/saveload/town_sl.cpp
Show inline comments
 
@@ -9,12 +9,13 @@
 

	
 
/** @file town_sl.cpp Code handling saving and loading of towns and houses */
 

	
 
#include "../stdafx.h"
 
#include "../newgrf_house.h"
 
#include "../town.h"
 
#include "../landscape.h"
 

	
 
#include "saveload.h"
 
#include "newgrf_sl.h"
 

	
 
/**
 
 * Check and update town and house values.
 
@@ -60,15 +61,15 @@ void UpdateHousesAndTowns()
 
				TileIndex tile = t + TileDiffXY(1, 0);
 
				if (!IsTileType(tile, MP_HOUSE) || GetCleanHouseType(tile) != house_type + 1) valid_house = false;
 
			} else if (hs->building_flags & TILE_SIZE_1x2) {
 
				TileIndex tile = t + TileDiffXY(0, 1);
 
				if (!IsTileType(tile, MP_HOUSE) || GetCleanHouseType(tile) != house_type + 1) valid_house = false;
 
			} else if (hs->building_flags & TILE_SIZE_2x2) {
 
				TileIndex tile = t + TileDiffXY(1, 0);
 
				TileIndex tile = t + TileDiffXY(0, 1);
 
				if (!IsTileType(tile, MP_HOUSE) || GetCleanHouseType(tile) != house_type + 1) valid_house = false;
 
				tile = t + TileDiffXY(0, 1);
 
				tile = t + TileDiffXY(1, 0);
 
				if (!IsTileType(tile, MP_HOUSE) || GetCleanHouseType(tile) != house_type + 2) valid_house = false;
 
				tile = t + TileDiffXY(1, 1);
 
				if (!IsTileType(tile, MP_HOUSE) || GetCleanHouseType(tile) != house_type + 3) valid_house = false;
 
			}
 
			/* If not all tiles of this house are present remove the house.
 
			 * The other tiles will get removed later in this loop because
0 comments (0 inline, 0 general)