diff options
author | rubidium <rubidium@openttd.org> | 2007-07-09 13:59:07 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-07-09 13:59:07 +0000 |
commit | 2801ccc5f2e2961e5fbbe700ff322723471b60f6 (patch) | |
tree | 24468a056c2a41770b2bce4e58600ea5962ffa88 | |
parent | e207ba425ff8739dbd46764c2a0bdaeaab7814db (diff) | |
download | openttd-2801ccc5f2e2961e5fbbe700ff322723471b60f6.tar.xz |
(svn r10486) -Fix: do not draw foundations when the "should I draw foundations" callbacks says to do so.
-rw-r--r-- | src/newgrf_callbacks.h | 2 | ||||
-rw-r--r-- | src/newgrf_industrytiles.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf_callbacks.h b/src/newgrf_callbacks.h index bab07c528..27d468c66 100644 --- a/src/newgrf_callbacks.h +++ b/src/newgrf_callbacks.h @@ -124,7 +124,7 @@ enum CallbackID { CBID_INDTILE_SHAPE_CHECK = 0x2F, // not yet implemented /* Called to determine the type (if any) of foundation to draw for industry tile */ - CBID_INDUSTRY_DRAW_FOUNDATIONS = 0x30, // not yet implemented + CBID_INDUSTRY_DRAW_FOUNDATIONS = 0x30, /* Called when the player (or AI) tries to start or stop a vehicle. Mainly * used for preventing a vehicle from leaving the depot. */ diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp index 5bce8b12d..a3f07242c 100644 --- a/src/newgrf_industrytiles.cpp +++ b/src/newgrf_industrytiles.cpp @@ -207,7 +207,7 @@ bool DrawNewIndustryTile(TileInfo *ti, Industry *i, IndustryGfx gfx, const Indus if (HASBIT(inds->callback_flags, CBM_INDT_DRAW_FOUNDATIONS)) { /* Called to determine the type (if any) of foundation to draw for industry tile */ uint32 callback_res = GetIndustryTileCallback(CBID_INDUSTRY_DRAW_FOUNDATIONS, 0, 0, gfx, i, ti->tile); - draw_old_one = callback_res == 0 || callback_res == CALLBACK_FAILED; + draw_old_one = callback_res != 0; } if (draw_old_one) DrawFoundation(ti, ti->tileh); |