diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index aae322082802a2478a2942d10efe352de3a47856..1c71829e3dbaec58fe90c3a4b7fdde98aeea476b 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -1034,10 +1034,10 @@ void LLWorld::updateWaterObjects() center_y = min_y + (wy >> 1); S32 add_boundary[4] = { - (S32)(512 - (max_x - region_x)), - (S32)(512 - (max_y - region_y)), - (S32)(512 - (region_x - min_x)), - (S32)(512 - (region_y - min_y)) }; + static_cast<S32>(512 - (max_x - (rwidth - 256) - region_x)), + static_cast<S32>(512 - (max_y - (rwidth - 256) - region_y)), + 512 - ((S32)region_x - min_x), + 512 - ((S32)region_y - min_y) }; S32 dir; for (dir = 0; dir < 8; dir++)