diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2010-07-06 16:29:07 -0600 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2010-07-06 16:29:07 -0600 |
commit | b50ab890529d408bf36e7874a217e687a5bbc46f (patch) | |
tree | 8e3ac75d1ac13797aaee488e8618a631a1a6ea77 /indra/newview | |
parent | a2e4bf241be7c5ce98d500d374cfd1d3b9159999 (diff) |
EXT-7983: FIXED: viewer gets confused about position of objects that cross a region boundary.
worked together with davep.
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; |