summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-05-04 18:10:17 +0000
committerpeter1138 <peter1138@openttd.org>2006-05-04 18:10:17 +0000
commit7b7c47655589e62a8333f225b5c29c9bceeec32b (patch)
tree57efad6624a744323f3e649d160a4f4a24d58066
parent786f9992beb2106968f880e6a6f94ee5a30ae0da (diff)
downloadopenttd-7b7c47655589e62a8333f225b5c29c9bceeec32b.tar.xz
(svn r4737) - Newstations: 'real' groups picked the wrong set of loading or loaded sprites
-rw-r--r--newgrf_station.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/newgrf_station.c b/newgrf_station.c
index 96f45c7f6..361f93033 100644
--- a/newgrf_station.c
+++ b/newgrf_station.c
@@ -287,15 +287,15 @@ static const SpriteGroup *StationResolveReal(const ResolverObject *object, const
cargo = min(0xfff, cargo);
if (cargo > statspec->cargo_threshold) {
- if (group->g.real.num_loaded > 0) {
- set = ((cargo - statspec->cargo_threshold) * group->g.real.num_loaded) / (0xfff - statspec->cargo_threshold);
- return group->g.real.loaded[set];
- }
- } else {
if (group->g.real.num_loading > 0) {
- set = (cargo * group->g.real.num_loading) / (statspec->cargo_threshold + 1);
+ set = ((cargo - statspec->cargo_threshold) * group->g.real.num_loading) / (0xfff - statspec->cargo_threshold);
return group->g.real.loading[set];
}
+ } else {
+ if (group->g.real.num_loaded > 0) {
+ set = (cargo * group->g.real.num_loaded) / (statspec->cargo_threshold + 1);
+ return group->g.real.loaded[set];
+ }
}
return group->g.real.loading[0];