From 87466a4ed091035b758ef981e6600e2b03cbfe30 Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 4 Jan 2010 18:21:07 +0000 Subject: (svn r18717) -Codechange: use TileArea in industry instead of three separate variables. Also make use of TileArea functions for determining the 'width' and 'height' of an industry. --- src/subsidy.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/subsidy.cpp') diff --git a/src/subsidy.cpp b/src/subsidy.cpp index 605be8411..631d80e81 100644 --- a/src/subsidy.cpp +++ b/src/subsidy.cpp @@ -236,7 +236,7 @@ static Subsidy *FindSubsidyCargoRoute() /* Only want big towns */ if (t->population < SUBSIDY_CARGO_MIN_POPULATION) return NULL; - if (DistanceManhattan(i->xy, t->xy) > SUBSIDY_MAX_DISTANCE) return NULL; + if (DistanceManhattan(i->location.tile, t->xy) > SUBSIDY_MAX_DISTANCE) return NULL; dst = t->index; } else { @@ -252,7 +252,7 @@ static Subsidy *FindSubsidyCargoRoute() return NULL; } - if (DistanceManhattan(i->xy, i2->xy) > SUBSIDY_MAX_DISTANCE) return NULL; + if (DistanceManhattan(i->location.tile, i2->location.tile) > SUBSIDY_MAX_DISTANCE) return NULL; dst = i2->index; } -- cgit v1.2.3-54-g00ecf