From 20e86fd5ea07b2ae0082f48ddb54d4da10b9d486 Mon Sep 17 00:00:00 2001 From: frosch Date: Sat, 14 May 2011 13:12:47 +0000 Subject: (svn r22454) -Codechange: Deduplicate GetCustomStationGroundRelocation() into GetCustomStationRelocation() and only call it if actually needed. --- src/station_cmd.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/station_cmd.cpp') diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 57abbb8ae..9f4048769 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -2678,7 +2678,12 @@ draw_default_foundation: } } else { if (HasBit(image, SPRITE_MODIFIER_CUSTOM_SPRITE)) { - image += GetCustomStationGroundRelocation(statspec, st, ti->tile); + if (HasBit(statspec->flags, SSF_SEPARATE_GROUND)) { + /* Use separate action 1-2-3 chain for ground sprite */ + image += GetCustomStationRelocation(statspec, st, ti->tile, 1); + } else { + image += relocation; + } image += custom_ground_offset; } else { image += total_offset; -- cgit v1.2.3-54-g00ecf