summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-11-22 15:57:31 +0000
committerfrosch <frosch@openttd.org>2008-11-22 15:57:31 +0000
commitf0286cb1e57a53b5be8565a325fdd7383cf6fc6f (patch)
treeb06e729b29f2c5c4c483b56da0c6f08f86cfd2b5
parentb759ccd0324cbb5aed606fffb5bcf8f1b494bbe5 (diff)
downloadopenttd-f0286cb1e57a53b5be8565a325fdd7383cf6fc6f.tar.xz
(svn r14605) -Fix (r9315): When callback 1E fails, use the standard random colour.
-rw-r--r--src/newgrf_house.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp
index 296139caa..79bb20259 100644
--- a/src/newgrf_house.cpp
+++ b/src/newgrf_house.cpp
@@ -447,14 +447,13 @@ static void DrawTileLayout(const TileInfo *ti, const SpriteGroup *group, byte st
if (HasBit(image, PALETTE_MODIFIER_TRANSPARENT) || HasBit(image, PALETTE_MODIFIER_COLOR)) {
if (pal == 0) {
const HouseSpec *hs = GetHouseSpecs(house_id);
+ pal = hs->random_colour[TileHash2Bit(ti->x, ti->y)] + PALETTE_RECOLOR_START;
if (HasBit(hs->callback_mask, CBM_HOUSE_COLOUR)) {
uint16 callback = GetHouseCallback(CBID_HOUSE_COLOUR, 0, 0, house_id, GetTownByTile(ti->tile), ti->tile);
if (callback != CALLBACK_FAILED) {
/* If bit 14 is set, we should use a 2cc colour map, else use the callback value. */
pal = HasBit(callback, 14) ? GB(callback, 0, 8) + SPR_2CCMAP_BASE : callback;
}
- } else {
- pal = hs->random_colour[TileHash2Bit(ti->x, ti->y)] + PALETTE_RECOLOR_START;
}
}
} else {