changeset 7067:1576a93e83c6 draft

(svn r10332) -Fix [FS#940]: ratings where also shown on drop-off stations.
author rubidium <rubidium@openttd.org>
date Mon, 25 Jun 2007 21:15:17 +0000
parents bd6373f5acf4
children 67b1f7744aee
files src/economy.cpp src/station_cmd.cpp
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -1556,7 +1556,6 @@
 		}
 
 		/* if last speed is 0, we treat that as if no vehicle has ever visited the station. */
-		ge->days_since_pickup = 0;
 		ge->last_speed = min(t, 255);
 		ge->last_age = _cur_year - u->build_year;
 
@@ -1594,6 +1593,7 @@
 			anything_loaded = true;
 
 			ge->cargo.MoveTo(&v->cargo, cap, CargoList::MTA_CARGO_LOAD, st->xy);
+			ge->days_since_pickup = 0;
 
 			unloading_time += cap;
 			st->time_since_load = 0;
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -2544,7 +2544,7 @@
 			if (around[i] == NULL) {
 				if (!st->IsBuoy() &&
 						(st->town->exclusive_counter == 0 || st->town->exclusivity == st->owner) && // check exclusive transport rights
-						st->goods[type].rating != 0 && st->goods[type].days_since_pickup != 255 && // we actually service the station
+						st->goods[type].rating != 0 && st->goods[type].last_speed != 0 && // we actually service the station
 						(!_patches.selectgoods || st->goods[type].last_speed > 0) && // if last_speed is 0, no vehicle has been there.
 						((st->facilities & ~FACIL_BUS_STOP)   != 0 || IsCargoInClass(type, CC_PASSENGERS)) && // if we have other fac. than a bus stop, or the cargo is passengers
 						((st->facilities & ~FACIL_TRUCK_STOP) != 0 || !IsCargoInClass(type, CC_PASSENGERS))) { // if we have other fac. than a cargo bay or the cargo is not passengers