diff options
author | frosch <frosch@openttd.org> | 2012-11-12 21:59:02 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2012-11-12 21:59:02 +0000 |
commit | 883f9bec9b762f3615524726cd8e17c2df19dbe1 (patch) | |
tree | fc7994745489e7d7148bb0151963faa12e29a745 /src/station_cmd.cpp | |
parent | ce87b8fc63c424fcb403130b2a5cf0dcf7c2980d (diff) | |
download | openttd-883f9bec9b762f3615524726cd8e17c2df19dbe1.tar.xz |
(svn r24718) -Codechange: Rename GoodsEntry::days_since_pickup to GoodsEntry::time_since_pickup.
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r-- | src/station_cmd.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 39a84b999..36e359b05 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -3187,7 +3187,7 @@ static void UpdateStationRating(Station *st) /* Only change the rating if we are moving this cargo */ if (HasBit(ge->acceptance_pickup, GoodsEntry::GES_PICKUP)) { - byte_inc_sat(&ge->days_since_pickup); + byte_inc_sat(&ge->time_since_pickup); bool skip = false; int rating = 0; @@ -3200,7 +3200,7 @@ static void UpdateStationRating(Station *st) /* NewGRFs expect last speed to be 0xFF when no vehicle has arrived yet. */ uint last_speed = ge->HasVehicleEverTriedLoading() ? ge->last_speed : 0xFF; - uint32 var18 = min(ge->days_since_pickup, 0xFF) | (min(waiting, 0xFFFF) << 8) | (min(last_speed, 0xFF) << 24); + uint32 var18 = min(ge->time_since_pickup, 0xFF) | (min(waiting, 0xFFFF) << 8) | (min(last_speed, 0xFF) << 24); /* Convert to the 'old' vehicle types */ uint32 var10 = (st->last_vehicle_type == VEH_INVALID) ? 0x0 : (st->last_vehicle_type + 0x10); uint16 callback = GetCargoCallback(CBID_CARGO_STATION_RATING_CALC, var10, var18, cs); @@ -3217,12 +3217,12 @@ static void UpdateStationRating(Station *st) int b = ge->last_speed - 85; if (b >= 0) rating += b >> 2; - byte days = ge->days_since_pickup; - if (st->last_vehicle_type == VEH_SHIP) days >>= 2; - (days > 21) || - (rating += 25, days > 12) || - (rating += 25, days > 6) || - (rating += 45, days > 3) || + byte waittime = ge->time_since_pickup; + if (st->last_vehicle_type == VEH_SHIP) waittime >>= 2; + (waittime > 21) || + (rating += 25, waittime > 12) || + (rating += 25, waittime > 6) || + (rating += 45, waittime > 3) || (rating += 35, true); (rating -= 90, waiting > 1500) || |