openttd.c
branch0.5
changeset 5468 10836820b2bc
parent 5459 74356913b47d
child 5497 b9c8c76d31b7
--- a/openttd.c	Mon Mar 19 20:23:27 2007 +0000
+++ b/openttd.c	Mon Mar 19 20:38:26 2007 +0000
@@ -385,6 +385,8 @@
 				_switch_mode = SM_LOAD;
 			} else {
 				_switch_mode = SM_NEWGAME;
+				/* Give a random map */
+				generation_seed = InteractiveRandom();
 			}
 			break;
 		case 'G': generation_seed = atoi(mgo.opt); break;
@@ -1594,6 +1596,21 @@
 		}
 	}
 
+	if (CheckSavegameVersion(7)) {
+		Station *st;
+		FOR_ALL_STATIONS(st) {
+			CargoID c;
+			for (c = 0; c < NUM_CARGO; c++) {
+				GoodsEntry *ge = &st->goods[c];
+
+				/* In old versions, enroute_from used 0xFF as INVALID_STATION */
+				if (ge->enroute_from == 0xFF) {
+					ge->enroute_from = INVALID_STATION;
+				}
+			}
+		}
+	}
+
 	return true;
 }