summaryrefslogtreecommitdiff
path: root/src/newgrf_station.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-08-26 13:55:36 +0000
committerrubidium <rubidium@openttd.org>2007-08-26 13:55:36 +0000
commita0d37ea7b9e26c7f918883262160e76f004e7e8f (patch)
treea1ad1c541e93eb8285d8b94ff26ffc3a974a4489 /src/newgrf_station.cpp
parent36c5b4e1ef8f15cc6a79447bc95cffef82d2eb32 (diff)
downloadopenttd-a0d37ea7b9e26c7f918883262160e76f004e7e8f.tar.xz
(svn r10981) -Fix [FS#1156] (r10970): stations gave ratings for accepted cargo too.
Diffstat (limited to 'src/newgrf_station.cpp')
-rw-r--r--src/newgrf_station.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp
index 4e40cacd8..58fd69631 100644
--- a/src/newgrf_station.cpp
+++ b/src/newgrf_station.cpp
@@ -429,7 +429,7 @@ static uint32 StationGetVariable(const ResolverObject *object, byte variable, by
uint32 value = 0;
for (cargo_type = 0; cargo_type < NUM_CARGO; cargo_type++) {
- if (st->goods[cargo_type].acceptance) SETBIT(value, cargo_type);
+ if (HASBIT(st->goods[cargo_type].acceptance_pickup, GoodsEntry::PICKUP)) SETBIT(value, cargo_type);
}
return value;
}
@@ -467,7 +467,7 @@ static uint32 StationGetVariable(const ResolverObject *object, byte variable, by
case 0x62: return ge->rating;
case 0x63: return ge->cargo.DaysInTransit();
case 0x64: return ge->last_speed | (ge->last_age << 8);
- case 0x65: return ge->acceptance << 3;
+ case 0x65: return GB(ge->acceptance_pickup, GoodsEntry::ACCEPTANCE, 1) << 3;
}
}
@@ -476,7 +476,7 @@ static uint32 StationGetVariable(const ResolverObject *object, byte variable, by
const GoodsEntry *g = &st->goods[GB(variable - 0x8C, 3, 4)];
switch (GB(variable - 0x8C, 0, 3)) {
case 0: return g->cargo.Count();
- case 1: return GB(min(g->cargo.Count(), 4095), 0, 4) | (g->acceptance << 7);
+ case 1: return GB(min(g->cargo.Count(), 4095), 0, 4) | (GB(g->acceptance_pickup, GoodsEntry::ACCEPTANCE, 1) << 7);
case 2: return g->days_since_pickup;
case 3: return g->rating;
case 4: return g->cargo.Source();