summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2010-07-07 12:19:54 -0600
committerXiaohong Bao <bao@lindenlab.com>2010-07-07 12:19:54 -0600
commit11621e88827e57010bf10eea6bdedcd4f1ffa793 (patch)
tree2e16bf01ab86b0138664c8c9a1db2136fb546d55 /indra/newview/llviewerobject.cpp
parentaef4f6ccabe0b2f72296f1a4ae5634080396690a (diff)
parentc0761b99b78e9ae4e694b7b4af6ae3e9020cb87e (diff)
Automated merge with ssh://hg.lindenlab.com/q/viewer-release
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r--indra/newview/llviewerobject.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 9a2866832a..6d93de2383 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -765,12 +765,19 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
{
LLViewerRegion* regionp = LLWorld::getInstance()->getRegionFromHandle(region_handle);
- if(regionp != mRegionp && regionp && mRegionp)
+ if(regionp != mRegionp && regionp && mRegionp)//region cross
{
+ //this is the redundant position and region update, but it is necessary in case the viewer misses the following
+ //position and region update messages from sim.
+ //this redundant update should not cause any problems.
LLVector3 delta_pos = mRegionp->getOriginAgent() - regionp->getOriginAgent();
- setPosition(getPosition() + delta_pos) ; //update the region position immediately.
+ setPositionParent(getPosition() + delta_pos); //update to the new region position immediately.
+ setRegion(regionp) ; //change the region.
+ }
+ else
+ {
+ mRegionp = regionp ;
}
- mRegionp = regionp ;
}
if (!mRegionp)