summaryrefslogtreecommitdiff
path: root/src/industry_cmd.cpp
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2007-08-22 01:16:08 +0000
committerbelugas <belugas@openttd.org>2007-08-22 01:16:08 +0000
commitd921cf88a37fc9cefa513f1349ba0fd42d204572 (patch)
treeb4b39f9d319e9fb7916de6871d9126169d9f2644 /src/industry_cmd.cpp
parentb5627afcea5d177db133a96eb971407e0cd2f403 (diff)
downloadopenttd-d921cf88a37fc9cefa513f1349ba0fd42d204572.tar.xz
(svn r10963) -Revert(10700): Although the idea was good, it was more prone of errors than usefull.
So now, it will be better to jump to the overriden tile when it is been marked as an override
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r--src/industry_cmd.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index 07a3996f2..28732cf75 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -113,19 +113,13 @@ const IndustrySpec *GetIndustrySpec(IndustryType thistype)
* This will ensure at once : proper access and
* not allowing modifications of it.
* @param gfx of industrytile (which is the index in _industry_tile_specs)
- * @param full_check (default to true) verify if an override is available.
- * If so, use it instead of the gfx provided.
* @pre gfx < INVALID_INDUSTRYTILE
* @return a pointer to the corresponding industrytile spec
**/
-const IndustryTileSpec *GetIndustryTileSpec(IndustryGfx gfx, bool full_check)
+const IndustryTileSpec *GetIndustryTileSpec(IndustryGfx gfx)
{
assert(gfx < INVALID_INDUSTRYTILE);
- const IndustryTileSpec *its = &_industry_tile_specs[gfx];
- if (full_check && its->grf_prop.override != INVALID_INDUSTRYTILE) {
- its = &_industry_tile_specs[its->grf_prop.override];
- }
- return its;
+ return &_industry_tile_specs[gfx];
}
Industry::~Industry()
@@ -334,6 +328,7 @@ static void GetAcceptedCargo_Industry(TileIndex tile, AcceptedCargo ac)
{
IndustryGfx gfx = GetIndustryGfx(tile);
const IndustryTileSpec *itspec = GetIndustryTileSpec(gfx);
+ if (itspec->grf_prop.override != INVALID_INDUSTRYTILE) itspec = GetIndustryTileSpec(itspec->grf_prop.override);
/* When we have to use a callback, we put our data in the next two variables */
CargoID raw_accepts_cargo[lengthof(itspec->accepts_cargo)];