diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2010-07-06 16:32:06 -0600 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2010-07-06 16:32:06 -0600 |
commit | f35b688153ade847487987a0c71c1ba48ec658af (patch) | |
tree | 81602c224d9a261f4638c459bc8ee5e32e05589c /indra/newview | |
parent | d2d5b467264b00a38fafa7c910af5cfa695420b3 (diff) | |
parent | b50ab890529d408bf36e7874a217e687a5bbc46f (diff) |
Automated merge with ssh://hg.lindenlab.com/q/viewer-release
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llviewerobject.cpp | 12 |
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; |