aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-06-13 13:01:57 -0700
committerJacek Antonelli2010-06-19 02:43:38 -0500
commitcad41f1ae08927737eca4cd9df25381d78e82304 (patch)
tree31c687f74defb0ebdcdcb5f97483312a8e612631 /linden/indra/newview/llviewermessage.cpp
parentwip forcing region disconnects to log you out (diff)
downloadmeta-impy-cad41f1ae08927737eca4cd9df25381d78e82304.zip
meta-impy-cad41f1ae08927737eca4cd9df25381d78e82304.tar.gz
meta-impy-cad41f1ae08927737eca4cd9df25381d78e82304.tar.bz2
meta-impy-cad41f1ae08927737eca4cd9df25381d78e82304.tar.xz
Fixed #338: addRegion/removeRegion can trigger a viewer quit
Diffstat (limited to 'linden/indra/newview/llviewermessage.cpp')
-rw-r--r--linden/indra/newview/llviewermessage.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp
index 7832b99..58b6df4 100644
--- a/linden/indra/newview/llviewermessage.cpp
+++ b/linden/indra/newview/llviewermessage.cpp
@@ -3333,14 +3333,18 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
3333 3333
3334 // set our upstream host the new simulator and shuffle things as 3334 // set our upstream host the new simulator and shuffle things as
3335 // appropriate. 3335 // appropriate.
3336 LLVector3 shift_vector = regionp->getPosRegionFromGlobal( 3336 // Sometimes OpenSim will get here but still fail on a teleport -- MC
3337 gAgent.getRegion()->getOriginGlobal()); 3337 if (regionp != gAgent.getRegion())
3338 gAgent.setRegion(regionp); 3338 {
3339 gObjectList.shiftObjects(shift_vector); 3339 LLVector3 shift_vector = regionp->getPosRegionFromGlobal(
3340 gAssetStorage->setUpstream(msg->getSender()); 3340 gAgent.getRegion()->getOriginGlobal());
3341 gCacheName->setUpstream(msg->getSender()); 3341 gAgent.setRegion(regionp);
3342 gViewerThrottle.sendToSim(); 3342 gObjectList.shiftObjects(shift_vector);
3343 gViewerWindow->sendShapeToSim(); 3343 gAssetStorage->setUpstream(msg->getSender());
3344 gCacheName->setUpstream(msg->getSender());
3345 gViewerThrottle.sendToSim();
3346 gViewerWindow->sendShapeToSim();
3347 }
3344 3348
3345 bool is_teleport = gAgent.getTeleportState() == LLAgent::TELEPORT_MOVING; 3349 bool is_teleport = gAgent.getTeleportState() == LLAgent::TELEPORT_MOVING;
3346 3350