diff options
| author | Adam Moss <moss@lindenlab.com> | 2009-04-16 23:45:35 +0000 |
|---|---|---|
| committer | Adam Moss <moss@lindenlab.com> | 2009-04-16 23:45:35 +0000 |
| commit | b01c75cb423f07a3d3354f8bd62f265f80062b3b (patch) | |
| tree | dec1b220c24a60cc220d1cb07fd3545610644f0a /indra/newview/llworld.cpp | |
| parent | 868250bdd74f348557102c0d8408d9bec30331f6 (diff) | |
svn merge -r117314:117337
svn+ssh://svn.lindenlab.com/svn/linden/branches/moss/mv13a-merge-1
QAR-1343 maint-viewer-13a+libcurlexploitfix-3-3 combo merge
Diffstat (limited to 'indra/newview/llworld.cpp')
| -rw-r--r-- | indra/newview/llworld.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index c9cc86bbbc..3fdef29540 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -367,9 +367,14 @@ LLVector3d LLWorld::clipToVisibleRegions(const LLVector3d &start_pos, const LLVe clip_factor = (region_coord.mV[VY] - region_width) / delta_pos_abs.mdV[VY]; } - // clamp to < 256 to stay in sim + // clamp to within region dimensions LLVector3d final_region_pos = LLVector3d(region_coord) - (delta_pos * clip_factor); - final_region_pos.clamp(0.0, 255.999); + final_region_pos.mdV[VX] = llclamp(final_region_pos.mdV[VX], 0.0, + (F64)(region_width - F_ALMOST_ZERO)); + final_region_pos.mdV[VY] = llclamp(final_region_pos.mdV[VY], 0.0, + (F64)(region_width - F_ALMOST_ZERO)); + final_region_pos.mdV[VZ] = llclamp(final_region_pos.mdV[VZ], 0.0, + (F64)(LLWorld::getInstance()->getRegionMaxHeight() - F_ALMOST_ZERO)); return regionp->getPosGlobalFromRegion(LLVector3(final_region_pos)); } |
