(svn r12556) -Fix (r6001): remove fences with fields when loading old savegames, looks better
authorsmatz
Thu, 03 Apr 2008 23:52:43 +0000
changeset 8811 1a3302cf5d5c
parent 8810 33066120c736
child 8812 4fd6de597c6e
(svn r12556) -Fix (r6001): remove fences with fields when loading old savegames, looks better
src/openttd.cpp
--- a/src/openttd.cpp	Thu Apr 03 22:31:57 2008 +0000
+++ b/src/openttd.cpp	Thu Apr 03 23:52:43 2008 +0000
@@ -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);
 			}
 		}