diff options
Diffstat (limited to 'crawl-ref/source/dungeon.cc')
-rw-r--r-- | crawl-ref/source/dungeon.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index 1c1d27f642..93e5086ef6 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -7632,8 +7632,9 @@ coord_def dgn_random_point_from(const coord_def &c, int radius, int margin) while (attempts-- > 0) { const double angle = dgn_degrees_to_radians(random2(360)); - const coord_def res = c + coord_def(radius * cos(angle), - radius * sin(angle)); + const coord_def res = + c + coord_def(static_cast<int>(radius * cos(angle)), + static_cast<int>(radius * sin(angle))); if (res.x >= margin && res.x < GXM - margin && res.y >= margin && res.y < GYM - margin) { |