diff options
author | frosch <frosch@openttd.org> | 2011-11-08 17:26:49 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2011-11-08 17:26:49 +0000 |
commit | 30874b5e81af0fff2f42d34b9b105ee86666b8ac (patch) | |
tree | 6fd8200f08019910de826cf6f1b9b6e92f7d2d69 /src/newgrf_industrytiles.cpp | |
parent | b98c7763de42eda4b3d19604bc3f33452b9b05e4 (diff) | |
download | openttd-30874b5e81af0fff2f42d34b9b105ee86666b8ac.tar.xz |
(svn r23147) -Change: [NewGRF v8] Unify the return values of boolean callbacks, and check the results for validity.
Diffstat (limited to 'src/newgrf_industrytiles.cpp')
-rw-r--r-- | src/newgrf_industrytiles.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp index 187a63ddc..0014a0bd8 100644 --- a/src/newgrf_industrytiles.cpp +++ b/src/newgrf_industrytiles.cpp @@ -248,7 +248,7 @@ bool DrawNewIndustryTile(TileInfo *ti, Industry *i, IndustryGfx gfx, const Indus if (HasBit(inds->callback_mask, CBM_INDT_DRAW_FOUNDATIONS)) { /* Called to determine the type (if any) of foundation to draw for industry tile */ uint32 callback_res = GetIndustryTileCallback(CBID_INDTILE_DRAW_FOUNDATIONS, 0, 0, gfx, i, ti->tile); - draw_old_one = (callback_res != 0); + if (callback_res != CALLBACK_FAILED) draw_old_one = ConvertBooleanCallback(inds->grf_prop.grffile, CBID_INDTILE_DRAW_FOUNDATIONS, callback_res); } if (draw_old_one) DrawFoundation(ti, FOUNDATION_LEVELED); |