Fix to issue #139
This commit is contained in:
parent
40117f5cf4
commit
2ac852775d
1 changed files with 1 additions and 1 deletions
|
@ -372,7 +372,7 @@ void MapSight(const CPlayer &player, const Vec2i &pos, int w, int h, int range,
|
|||
// bottom hemi-cycle
|
||||
const int maxy = std::min(range, Map.Info.MapHeight - pos.y - h);
|
||||
for (int offsety = 0; offsety < maxy; ++offsety) {
|
||||
const int offsetx = isqrt(square(range + 1) - square(offsety) - 1);
|
||||
const int offsetx = isqrt(square(range + 1) - square(offsety + 1) - 1);
|
||||
const int minx = std::max(0, pos.x - offsetx);
|
||||
const int maxx = std::min(Map.Info.MapWidth, pos.x + w + offsetx);
|
||||
Vec2i mpos(minx, pos.y + h + offsety);
|
||||
|
|
Loading…
Reference in a new issue