From 932dd4d222b514f81ad5ad3a06b599cce04f7e23 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Tue, 22 Jun 2010 20:09:45 -0500 Subject: Partially reverted cad41f1 and 65a5856 to help login issues. This reverts (except for some parts): - Commit cad41f1ae08927737eca4cd9df25381d78e82304. "Fixed #338: addRegion/removeRegion can trigger a viewer quit" - Commit 65a5856f9567074886f28df59a26433c4b447576. "wip forcing region disconnects to log you out" --- linden/indra/newview/llstartup.cpp | 11 ++--------- linden/indra/newview/llviewermessage.cpp | 20 ++++++++------------ linden/indra/newview/llworld.cpp | 31 +------------------------------ 3 files changed, 11 insertions(+), 51 deletions(-) diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index 735397e..a391669 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp @@ -1809,13 +1809,8 @@ bool idle_startup() regionp->setSeedCapability(first_sim_seed_cap); LL_DEBUGS("AppInit") << "Waiting for seed grant ...." << LL_ENDL; - // Set agent's initial region to be the one we just created - // Only if we don't already have one set. We want to catch this here - // because setRegion calls removeRegion, which kills the viewer -- MC - if (!gAgent.getRegion() && gAgent.getRegion() != regionp) - { - gAgent.setRegion(regionp); - } + // Set agent's initial region to be the one we just created. + gAgent.setRegion(regionp); // Set agent's initial position, which will be read by LLVOAvatar when the avatar // object is created. I think this must be done after setting the region. JC @@ -3629,7 +3624,6 @@ std::string LLStartUp::startupStateToString(EStartupState state) #define RTNENUM(E) case E: return #E switch(state){ RTNENUM( STATE_FIRST ); - RTNENUM( STATE_BROWSER_INIT ); RTNENUM( STATE_LOGIN_SHOW ); RTNENUM( STATE_LOGIN_WAIT ); RTNENUM( STATE_LOGIN_CLEANUP ); @@ -3640,7 +3634,6 @@ std::string LLStartUp::startupStateToString(EStartupState state) RTNENUM( STATE_LOGIN_DOWNLOADING ); RTNENUM( STATE_LOGIN_PROCESS_RESPONSE ); RTNENUM( STATE_WORLD_INIT ); - RTNENUM( STATE_MULTIMEDIA_INIT ); RTNENUM( STATE_SEED_GRANTED_WAIT ); RTNENUM( STATE_SEED_CAP_GRANTED ); RTNENUM( STATE_WORLD_WAIT ); diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index b1c316d..ecbe0ef 100644 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp @@ -3331,18 +3331,14 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) // set our upstream host the new simulator and shuffle things as // appropriate. - // Sometimes OpenSim will get here but still fail on a teleport -- MC - if (regionp != gAgent.getRegion()) - { - LLVector3 shift_vector = regionp->getPosRegionFromGlobal( - gAgent.getRegion()->getOriginGlobal()); - gAgent.setRegion(regionp); - gObjectList.shiftObjects(shift_vector); - gAssetStorage->setUpstream(msg->getSender()); - gCacheName->setUpstream(msg->getSender()); - gViewerThrottle.sendToSim(); - gViewerWindow->sendShapeToSim(); - } + LLVector3 shift_vector = regionp->getPosRegionFromGlobal( + gAgent.getRegion()->getOriginGlobal()); + gAgent.setRegion(regionp); + gObjectList.shiftObjects(shift_vector); + gAssetStorage->setUpstream(msg->getSender()); + gCacheName->setUpstream(msg->getSender()); + gViewerThrottle.sendToSim(); + gViewerWindow->sendShapeToSim(); bool is_teleport = gAgent.getTeleportState() == LLAgent::TELEPORT_MOVING; diff --git a/linden/indra/newview/llworld.cpp b/linden/indra/newview/llworld.cpp index 50d4250..90ab49b 100644 --- a/linden/indra/newview/llworld.cpp +++ b/linden/indra/newview/llworld.cpp @@ -43,9 +43,7 @@ #include "lldrawpool.h" #include "llglheaders.h" #include "llhttpnode.h" -#include "llpanellogin.h" #include "llregionhandle.h" -#include "llstartup.h" #include "llsurface.h" #include "llviewercamera.h" #include "llviewerimage.h" @@ -86,7 +84,6 @@ const F32 LLWorld::mWidthInMeters = mWidth * mScale; // // Functions // -bool connecting_alert_done(const LLSD& notification, const LLSD& response); // allocate the stack LLWorld::LLWorld() : @@ -266,19 +263,7 @@ void LLWorld::removeRegion(const LLHost &host) llwarns << "gFrameTimeSeconds " << gFrameTimeSeconds << llendl; llwarns << "Disabling region " << regionp->getName() << " that agent is in!" << llendl; - - // Don't ever forceQuit on the user during startup if we can avoid it -- MC - //LLAppViewer::instance()->forceDisconnect("You have been disconnected from the region you were in."); - // We stop a login, even if it's a successful one, as the expected behavior is to not receive - // any more messages from a sim when we receive the DisableSimulator message, despite the viewer - // continuing to connect anyway -- MC - if (LLStartUp::getStartupState() < STATE_STARTED) - { - //LLStartUp::setLoginFailed(true); - LLStartUp::setStartupState(STATE_SEED_GRANTED_WAIT); - } - LLNotifications::instance().add("DisconnectedFromRegion", LLSD(), LLSD(), connecting_alert_done); - + LLAppViewer::instance()->forceDisconnect("You have been disconnected from the region you were in."); return; } @@ -1258,20 +1243,6 @@ void LLWorld::getAvatars(std::vector* avatar_ids, std::vectorforceDisconnect("You have been disconnected from the region you were in. Unable to continue."); - } - return false; -} LLHTTPRegistration gHTTPRegistrationEstablishAgentCommunication( -- cgit v1.1