openttd.c
changeset 2805 29e2b43a1e20
parent 2769 eab49a86038e
child 2808 8ece7af41664
equal deleted inserted replaced
2804:ea4080819175 2805:29e2b43a1e20
  1261 			p->engine_renew_months = _patches.autorenew_months;
  1261 			p->engine_renew_months = _patches.autorenew_months;
  1262 			p->engine_renew_money = _patches.autorenew_money;
  1262 			p->engine_renew_money = _patches.autorenew_money;
  1263 		}
  1263 		}
  1264 	}
  1264 	}
  1265 
  1265 
  1266 	/* In version 16.1 of the savegame, trains became aware of station lengths
  1266 	/* In version 16.1 of the savegame a player can decide if trains, which get
  1267 		need to initialized to the invalid state
  1267 	 * replaced, shall keep their old length. In all prior versions, just default
  1268 		players needs to set renew_keep_length too */
  1268 	 * to false */
  1269 	if (CheckSavegameVersionOldStyle(16, 1)) {
  1269 	if (CheckSavegameVersionOldStyle(16, 1)) {
  1270 		Vehicle *v;
       
  1271 		FOR_ALL_PLAYERS(p) {
  1270 		FOR_ALL_PLAYERS(p) {
  1272 			p->renew_keep_length = false;
  1271 			p->renew_keep_length = false;
  1273 		}
       
  1274 
       
  1275 		FOR_ALL_VEHICLES(v) {
       
  1276 			if (v->type == VEH_Train) {
       
  1277 				v->u.rail.shortest_platform[0] = 255;
       
  1278 				v->u.rail.shortest_platform[1] = 0;
       
  1279 			}
       
  1280 		}
  1272 		}
  1281 	}
  1273 	}
  1282 
  1274 
  1283 	/* In version 17, ground type is moved from m2 to m4 for depots and
  1275 	/* In version 17, ground type is moved from m2 to m4 for depots and
  1284 	 * waypoints to make way for storing the index in m2. The custom graphics
  1276 	 * waypoints to make way for storing the index in m2. The custom graphics