summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2010-07-06 16:32:06 -0600
committerXiaohong Bao <bao@lindenlab.com>2010-07-06 16:32:06 -0600
commitf35b688153ade847487987a0c71c1ba48ec658af (patch)
tree81602c224d9a261f4638c459bc8ee5e32e05589c
parentd2d5b467264b00a38fafa7c910af5cfa695420b3 (diff)
parentb50ab890529d408bf36e7874a217e687a5bbc46f (diff)
Automated merge with ssh://hg.lindenlab.com/q/viewer-release
-rw-r--r--indra/newview/llviewerobject.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 9027caa4ce..9a2866832a 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -762,7 +762,17 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
// Coordinates of objects on simulators are region-local.
U64 region_handle;
mesgsys->getU64Fast(_PREHASH_RegionData, _PREHASH_RegionHandle, region_handle);
- mRegionp = LLWorld::getInstance()->getRegionFromHandle(region_handle);
+
+ {
+ LLViewerRegion* regionp = LLWorld::getInstance()->getRegionFromHandle(region_handle);
+ if(regionp != mRegionp && regionp && mRegionp)
+ {
+ LLVector3 delta_pos = mRegionp->getOriginAgent() - regionp->getOriginAgent();
+ setPosition(getPosition() + delta_pos) ; //update the region position immediately.
+ }
+ mRegionp = regionp ;
+ }
+
if (!mRegionp)
{
U32 x, y;