summaryrefslogtreecommitdiff
path: root/newgrf_station.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-05-04 19:15:02 +0000
committerpeter1138 <peter1138@openttd.org>2006-05-04 19:15:02 +0000
commita55ac6efac979b9276faae4c71e965dd6a1b35c3 (patch)
tree1dacf3fc68eb5387c9170bda89a62e0d8330f066 /newgrf_station.c
parent0a16393ffe138bc9a9156e5c55ab3ea42e7c73d5 (diff)
downloadopenttd-a55ac6efac979b9276faae4c71e965dd6a1b35c3.tar.xz
(svn r4738) - Newstations: attach all sprite group cargo types, not just the default and purchase pseudo types, to a station spec.
Diffstat (limited to 'newgrf_station.c')
-rw-r--r--newgrf_station.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/newgrf_station.c b/newgrf_station.c
index 361f93033..ab6d2fc59 100644
--- a/newgrf_station.c
+++ b/newgrf_station.c
@@ -327,10 +327,14 @@ SpriteID GetCustomStationRelocation(const StationSpec *statspec, const Station *
{
const SpriteGroup *group;
ResolverObject object;
+ ctype = (st == NULL) ? GC_PURCHASE : GC_DEFAULT_NA;
NewStationResolver(&object, statspec, st, tile);
group = Resolve(statspec->spritegroup[ctype], &object);
+ if ((group == NULL || group->type != SGT_RESULT) && ctype != GC_DEFAULT_NA) {
+ group = Resolve(statspec->spritegroup[GC_DEFAULT_NA], &object);
+ }
if ((group == NULL || group->type != SGT_RESULT) && ctype != GC_DEFAULT) {
group = Resolve(statspec->spritegroup[GC_DEFAULT], &object);
}