aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview
diff options
context:
space:
mode:
authorJacek Antonelli2008-12-15 18:46:47 -0600
committerJacek Antonelli2008-12-15 18:49:02 -0600
commit72d56e10bb9f055791dd0584e83d2d298f14060a (patch)
tree02f0eb658978384a88711825d0ff672db7de8834 /linden/indra/newview
parentAdded menu option for inworld browser. (diff)
downloadmeta-impy-72d56e10bb9f055791dd0584e83d2d298f14060a.zip
meta-impy-72d56e10bb9f055791dd0584e83d2d298f14060a.tar.gz
meta-impy-72d56e10bb9f055791dd0584e83d2d298f14060a.tar.bz2
meta-impy-72d56e10bb9f055791dd0584e83d2d298f14060a.tar.xz
VWR-9352: Prim falls to 256m height when moved outworld.
Patch by Aimee Trescothick.
Diffstat (limited to 'linden/indra/newview')
-rw-r--r--linden/indra/newview/llworld.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/linden/indra/newview/llworld.cpp b/linden/indra/newview/llworld.cpp
index 66c4068..4dee103 100644
--- a/linden/indra/newview/llworld.cpp
+++ b/linden/indra/newview/llworld.cpp
@@ -365,9 +365,14 @@ LLVector3d LLWorld::clipToVisibleRegions(const LLVector3d &start_pos, const LLVe
365 clip_factor = (region_coord.mV[VY] - region_width) / delta_pos_abs.mdV[VY]; 365 clip_factor = (region_coord.mV[VY] - region_width) / delta_pos_abs.mdV[VY];
366 } 366 }
367 367
368 // clamp to < 256 to stay in sim 368 // clamp to within region dimensions
369 LLVector3d final_region_pos = LLVector3d(region_coord) - (delta_pos * clip_factor); 369 LLVector3d final_region_pos = LLVector3d(region_coord) - (delta_pos * clip_factor);
370 final_region_pos.clamp(0.0, 255.999); 370 final_region_pos.mdV[VX] = llclamp(final_region_pos.mdV[VX], 0.0,
371 (F64)(region_width - F_ALMOST_ZERO));
372 final_region_pos.mdV[VY] = llclamp(final_region_pos.mdV[VY], 0.0,
373 (F64)(region_width - F_ALMOST_ZERO));
374 final_region_pos.mdV[VZ] = llclamp(final_region_pos.mdV[VZ], 0.0,
375 (F64)(LLWorld::getInstance()->getRegionMaxHeight()));
371 return regionp->getPosGlobalFromRegion(LLVector3(final_region_pos)); 376 return regionp->getPosGlobalFromRegion(LLVector3(final_region_pos));
372} 377}
373 378