diff src/openttd.cpp @ 5677:2eb2392c2550 draft

(svn r8137) -Fix (FS#551, r4259, r4320): roadstop->num_vehicles was wrong for savegames with version 24 or lower and do not calculate roadstop->num_vehicles when reading the roadstops as the vehicles might not be loaded at that moment.
author rubidium <rubidium@openttd.org>
date Sun, 14 Jan 2007 23:09:25 +0000 (2007-01-14)
parents 78a7505fd513
children 809a5610092f
line wrap: on
line diff
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -1553,6 +1553,11 @@
 				v->u.road.slot_age = 0;
 			}
 		}
+	} else {
+		Vehicle *v;
+		FOR_ALL_VEHICLES(v) {
+			if (v->type == VEH_Road && v->u.road.slot != NULL) v->u.road.slot->num_vehicles++;
+		}
 	}
 
 	if (CheckSavegameVersion(26)) {