diff options
author | Dessie Linden <dessie@lindenlab.com> | 2010-07-08 08:03:44 -0700 |
---|---|---|
committer | Dessie Linden <dessie@lindenlab.com> | 2010-07-08 08:03:44 -0700 |
commit | 0a2fc3e4b93c13854a1776456ebed7f53ceb67e8 (patch) | |
tree | 81fd1a3b3ce43f29a1f5d6e0925b288eeff2b090 /indra/newview/llviewerobject.cpp | |
parent | 8cda9a026691690fd7e4bb0013cbccc287ef96d5 (diff) | |
parent | ca5e05a5c763b8eba3c6441f0f931af27cc89542 (diff) |
Merged from viewer-release
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) |