diff options
author | rubidium <rubidium@openttd.org> | 2010-01-04 18:21:07 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-01-04 18:21:07 +0000 |
commit | 87466a4ed091035b758ef981e6600e2b03cbfe30 (patch) | |
tree | b5a79792fb0f12f7f3a96e400091c1fda26de9c5 /src/subsidy.cpp | |
parent | 71f2789270ca091af14ab4cfd64a4f17234cf007 (diff) | |
download | openttd-87466a4ed091035b758ef981e6600e2b03cbfe30.tar.xz |
(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.
Diffstat (limited to 'src/subsidy.cpp')
-rw-r--r-- | src/subsidy.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |