summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-04-08 13:58:19 +0000
committertron <tron@openttd.org>2006-04-08 13:58:19 +0000
commit78a74a94a69fae16fc1b565c829a58e7c28e3b22 (patch)
tree938e14bfa1095d688f62af769ff4cfade1acff60
parenta0e471a025263b146744772ff16cf1ba4c2c9aed (diff)
downloadopenttd-78a74a94a69fae16fc1b565c829a58e7c28e3b22.tar.xz
(svn r4325) When updating the vehicle count for road stops after load use the slot pointer of the vehicle instead of recalculating the road stop using the destination tile of the vehicle. Apart from being more simple this could prevent a inconsistency of slot information in the edge case when the destination tile isn't the tile of the assigned slot.
-rw-r--r--station_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/station_cmd.c b/station_cmd.c
index 488f3772d..5398140f2 100644
--- a/station_cmd.c
+++ b/station_cmd.c
@@ -2934,7 +2934,7 @@ static void Load_ROADSTOP(void)
}
FOR_ALL_VEHICLES(v) {
- if (v->type == VEH_Road && v->u.road.slot != NULL) GetRoadStopByTile(v->dest_tile, v->cargo_type == CT_PASSENGERS ? RS_BUS : RS_TRUCK)->num_vehicles++;
+ if (v->type == VEH_Road && v->u.road.slot != NULL) v->u.road.slot->num_vehicles++;
}
}