diff options
-rw-r--r-- | ChangeLog.txt | 7 | ||||
-rw-r--r-- | linden/indra/newview/llworld.cpp | 9 |
2 files changed, 14 insertions, 2 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt index 876ef3e..b6b9739 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt | |||
@@ -1,3 +1,10 @@ | |||
1 | 2008-12-15 Jacek Antonelli <jacek.antonelli@gmail.com> | ||
2 | |||
3 | * linden/indra/newview/llworld.cpp: | ||
4 | VWR-9352: Prim falls to 256m height when moved outworld. | ||
5 | Patch by Aimee Trescothick. | ||
6 | |||
7 | |||
1 | 2008-12-13 Jacek Antonelli <jacek.antonelli@gmail.com> | 8 | 2008-12-13 Jacek Antonelli <jacek.antonelli@gmail.com> |
2 | 9 | ||
3 | * linden/scripts/build_version.py: | 10 | * linden/scripts/build_version.py: |
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 | ||