src/openttd.cpp
branchnoai
changeset 9601 b499fdd106d5
parent 9599 949374e83b78
child 9620 31e38d28a0af
--- a/src/openttd.cpp	Sun Apr 15 10:30:00 2007 +0000
+++ b/src/openttd.cpp	Sun Apr 22 19:06:48 2007 +0000
@@ -355,7 +355,7 @@
 	int i;
 	const char *optformat;
 	char musicdriver[32], sounddriver[32], videodriver[32], ai[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;
@@ -386,7 +386,7 @@
 #endif
 	;
 
-	MyGetOptData mgo(argc-1, argv+1, optformat);
+	MyGetOptData mgo(argc - 1, argv + 1, optformat);
 
 	while ((i = MyGetOpt(&mgo)) != -1) {
 		switch (i) {
@@ -1922,6 +1922,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;
 }