changeset 8811:8e6d3b3fb0ba draft

(svn r12556) -Fix (r6001): remove fences with fields when loading old savegames, looks better
author smatz <smatz@openttd.org>
date Thu, 03 Apr 2008 23:52:43 +0000
parents f0164fff3eea
children 6bb8899ceba9
files src/openttd.cpp
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -1963,7 +1963,12 @@
 
 		for (TileIndex t = 0; t < map_size; t++) {
 			if (IsTileType(t, MP_CLEAR) && IsClearGround(t, CLEAR_FIELDS)) {
+				/* remove fields */
 				MakeClear(t, CLEAR_GRASS, 3);
+			} else if (IsTileType(t, MP_CLEAR) || IsTileType(t, MP_TREES)) {
+				/* remove fences around fields */
+				SetFenceSE(t, 0);
+				SetFenceSW(t, 0);
 			}
 		}