src/openttd.cpp
branchcpp_gui
changeset 6308 646711c5feaa
parent 6307 f40e88cff863
--- a/src/openttd.cpp	Sun Apr 15 17:04:44 2007 +0000
+++ b/src/openttd.cpp	Sat Apr 21 08:23:57 2007 +0000
@@ -348,7 +348,7 @@
 	int i;
 	const char *optformat;
 	char musicdriver[32], sounddriver[32], videodriver[32];
-	int resolution[2] = {0,0};
+	int resolution[2] = {0, 0};
 	Year startyear = INVALID_YEAR;
 	uint generation_seed = GENERATE_NEW_SEED;
 	bool save_config = true;
@@ -379,7 +379,7 @@
 #endif
 	;
 
-	MyGetOptData mgo(argc-1, argv+1, optformat);
+	MyGetOptData mgo(argc - 1, argv + 1, optformat);
 
 	while ((i = MyGetOpt(&mgo)) != -1) {
 		switch (i) {
@@ -1913,6 +1913,31 @@
 		}
 	}
 
+	/* A patch option containing the proportion of towns that grow twice as
+	 * fast was added in version 54. From version 56 this is now saved in the
+	 * town as cities can be built specifically in the scenario editor. */
+	if (CheckSavegameVersion(56)) {
+		Town *t;
+
+		FOR_ALL_TOWNS(t) {
+			if (_patches.larger_towns != 0 && (t->index % _patches.larger_towns) == 0) {
+				t->larger_town = true;
+			}
+		}
+	}
+
+	if (CheckSavegameVersion(57)) {
+		Vehicle *v;
+		/* Added a FIFO queue of vehicles loading at stations */
+		FOR_ALL_VEHICLES(v) {
+			if ((v->type != VEH_TRAIN || IsFrontEngine(v)) &&  // for all locs
+					!(v->vehstatus & (VS_STOPPED | VS_CRASHED)) && // not stopped or crashed
+					v->current_order.type == OT_LOADING) {         // loading
+				GetStation(v->last_station_visited)->loading_vehicles.push_back(v);
+			}
+		}
+	}
+
 	return true;
 }