diff options
author | PeterN <peter@fuzzle.org> | 2019-04-13 14:27:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-13 14:27:57 +0100 |
commit | 3bbd7ea2c1a7f3631362805da76848112f7a606d (patch) | |
tree | 844aa787fc1043c392a20ec800d49b907f3f7580 /src/bitmap_type.h | |
parent | abe8cf4985da211ad70c6232a3c737f15574f5de (diff) | |
download | openttd-3bbd7ea2c1a7f3631362805da76848112f7a606d.tar.xz |
Fix: Industry coverage area is no longer rectangular. (#7464)
AIs test station catchment in reverse to how players see station catchment.
This did not take account of non-rectangular station catchment areas, so AIs
could end up placing stations in locations that did not accept/deliver cargo.
Diffstat (limited to 'src/bitmap_type.h')
-rw-r--r-- | src/bitmap_type.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/bitmap_type.h b/src/bitmap_type.h index 11a419093..3c9c4afbd 100644 --- a/src/bitmap_type.h +++ b/src/bitmap_type.h @@ -34,6 +34,14 @@ public: this->h = 0; } + BitmapTileArea(const TileArea &ta) + { + this->tile = ta.tile; + this->w = ta.w; + this->h = ta.h; + this->data.resize(Index(this->w, this->h)); + } + /** * Reset and clear the BitmapTileArea. */ |