summaryrefslogtreecommitdiff
path: root/src/station_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-04-06 12:10:16 +0000
committerrubidium <rubidium@openttd.org>2013-04-06 12:10:16 +0000
commitb2292122b660372f253a8e0813e24366cbd049dc (patch)
treed193e255d20344603b30278857f3be3211d93eda /src/station_cmd.cpp
parent70454b8d64ee2469859c9153b74f4d26b47c898c (diff)
downloadopenttd-b2292122b660372f253a8e0813e24366cbd049dc.tar.xz
(svn r25149) -Codechange: replace 'magic' 'has rating' bitcheck by descriptive function
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r--src/station_cmd.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index 3a0275fad..67933160d 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -3215,12 +3215,12 @@ static void UpdateStationRating(Station *st)
/* Slowly increase the rating back to his original level in the case we
* didn't deliver cargo yet to this station. This happens when a bribe
* failed while you didn't moved that cargo yet to a station. */
- if (!HasBit(ge->acceptance_pickup, GoodsEntry::GES_PICKUP) && ge->rating < INITIAL_STATION_RATING) {
+ if (!ge->HasRating() && ge->rating < INITIAL_STATION_RATING) {
ge->rating++;
}
/* Only change the rating if we are moving this cargo */
- if (HasBit(ge->acceptance_pickup, GoodsEntry::GES_PICKUP)) {
+ if (ge->HasRating()) {
byte_inc_sat(&ge->time_since_pickup);
bool skip = false;
@@ -3411,7 +3411,7 @@ static uint UpdateStationWaiting(Station *st, CargoID type, uint amount, SourceT
ge.cargo.Append(new CargoPacket(st->index, st->xy, amount, source_type, source_id));
- if (!HasBit(ge.acceptance_pickup, GoodsEntry::GES_PICKUP)) {
+ if (!ge.HasRating()) {
InvalidateWindowData(WC_STATION_LIST, st->index);
SetBit(ge.acceptance_pickup, GoodsEntry::GES_PICKUP);
}