From f0286cb1e57a53b5be8565a325fdd7383cf6fc6f Mon Sep 17 00:00:00 2001 From: frosch Date: Sat, 22 Nov 2008 15:57:31 +0000 Subject: [PATCH] (svn r14605) -Fix (r9315): When callback 1E fails, use the standard random colour. --- src/newgrf_house.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp index 296139caae..79bb202594 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 {