diff options
author | Brendan Hickey <brendan@bhickey.net> | 2012-09-12 22:33:20 -0700 |
---|---|---|
committer | Brendan Hickey <brendan@bhickey.net> | 2012-12-30 19:06:12 -0800 |
commit | c3c62dc86dcbaf4d851d81f23506767dbc2c38ee (patch) | |
tree | 87b5cfe8d47e2e701f1b09491de7508a25bc5fb4 /crawl-ref/source/dgn-proclayouts.cc | |
parent | 0ff38d3c32940108188d0108a953002fe5e10c6e (diff) | |
download | crawl-ref-c3c62dc86dcbaf4d851d81f23506767dbc2c38ee.tar.gz crawl-ref-c3c62dc86dcbaf4d851d81f23506767dbc2c38ee.zip |
Proclayout fixup
ColumnLayout should handle very large negative values.
Clear MMT_NUKED after the dungeon has repaired itself.
Diffstat (limited to 'crawl-ref/source/dgn-proclayouts.cc')
-rw-r--r-- | crawl-ref/source/dgn-proclayouts.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/dgn-proclayouts.cc b/crawl-ref/source/dgn-proclayouts.cc index b55fbef8c2..bd12593951 100644 --- a/crawl-ref/source/dgn-proclayouts.cc +++ b/crawl-ref/source/dgn-proclayouts.cc @@ -9,8 +9,8 @@ ProceduralSample ColumnLayout::operator()(const coord_def &p, const uint32_t offset) { - int x = p.x % (_col_width + _col_space); - int y = p.y % (_row_width + _row_space); + int x = abs(p.x) % (_col_width + _col_space); + int y = abs(p.y) % (_row_width + _row_space); if (x < _col_width && y < _row_width) return ProceduralSample(p, DNGN_ROCK_WALL, -1); return ProceduralSample(p, DNGN_FLOOR, -1); |