(svn r10268) -Fix: some old savegames could have the wrong bits unset (follow up of r10147)
authorrubidium
Fri, 22 Jun 2007 17:33:13 +0000
changeset 7508 d1c4fa7461c6
parent 7507 c287e5e93517
child 7509 5adc45aa7c3c
(svn r10268) -Fix: some old savegames could have the wrong bits unset (follow up of r10147)
src/openttd.cpp
--- a/src/openttd.cpp	Fri Jun 22 13:10:56 2007 +0000
+++ b/src/openttd.cpp	Fri Jun 22 17:33:13 2007 +0000
@@ -2061,6 +2061,16 @@
 		}
 	}
 
+	if (CheckSavegameVersion(69)) {
+		/* In some old savegames a bit was cleared when it should not be cleared */
+		Vehicle *v;
+		FOR_ALL_VEHICLES(v) {
+			if (v->type == VEH_ROAD && (v->u.road.state == 250 || v->u.road.state == 251)) {
+				SETBIT(v->u.road.state, RVS_IS_STOPPING);
+			}
+		}
+	}
+
 	/* Recalculate */
 	Group *g;
 	FOR_ALL_GROUPS(g) {