From 2352e76a8f784c07a672ec658fa84d4294c0333c Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 14 Jan 2007 23:09:25 +0000 Subject: (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. --- src/openttd.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/openttd.cpp') diff --git a/src/openttd.cpp b/src/openttd.cpp index 10eb7f55e..e0d0d1f27 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -1553,6 +1553,11 @@ bool AfterLoadGame(void) 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)) { -- cgit v1.2.3-54-g00ecf