Mercurial > hg > openttd
changeset 3480:9958c9ee9f30 draft
(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.
author | tron <tron@openttd.org> |
---|---|
date | Sat, 08 Apr 2006 13:58:19 +0000 |
parents | d9fe9ee967ab |
children | 04f480486974 |
files | station_cmd.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/station_cmd.c +++ b/station_cmd.c @@ -2934,7 +2934,7 @@ } 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++; } }