(svn r22454) -Codechange: Deduplicate GetCustomStationGroundRelocation() into GetCustomStationRelocation() and only call it if actually needed.

This commit is contained in:
frosch
2011-05-14 13:12:47 +00:00
parent fdd2f8447e
commit 20e86fd5ea
3 changed files with 23 additions and 24 deletions

View File

@@ -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;