diff options
author | Loren Shih <seraph@lindenlab.com> | 2010-07-09 10:19:15 -0400 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2010-07-09 10:19:15 -0400 |
commit | d8f795aa9ceaae73ad8890a1110fa6b4045843c7 (patch) | |
tree | 96bd0bbc9d7bbe2a6a8d9a543fc581d82fdc1965 /indra/newview/llviewerobject.cpp | |
parent | 9ae6672a15ae64dba1d2af774dcde26700fb6126 (diff) | |
parent | 467a8b0441e139773775ecf306f430f44814bff5 (diff) |
automated merge
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r-- | indra/newview/llviewerobject.cpp | 13 |
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) |