diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llstartup.cpp | 4 | ||||
-rw-r--r-- | linden/indra/newview/llworld.cpp | 25 |
2 files changed, 26 insertions, 3 deletions
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index 82b950e..8882773 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp | |||
@@ -2080,7 +2080,7 @@ bool idle_startup() | |||
2080 | LLHUDManager::getInstance()->sendEffects(); | 2080 | LLHUDManager::getInstance()->sendEffects(); |
2081 | } | 2081 | } |
2082 | 2082 | ||
2083 | // Drop out if we can't connect after TIMEOUT_SECONDS -- MC | 2083 | // Drop out if we can't connect -- MC |
2084 | connecting_region_timer.start(); | 2084 | connecting_region_timer.start(); |
2085 | LLStartUp::setStartupState( STATE_AGENT_WAIT ); // Go to STATE_AGENT_WAIT | 2085 | LLStartUp::setStartupState( STATE_AGENT_WAIT ); // Go to STATE_AGENT_WAIT |
2086 | 2086 | ||
@@ -2095,7 +2095,7 @@ bool idle_startup() | |||
2095 | if (STATE_AGENT_WAIT == LLStartUp::getStartupState()) | 2095 | if (STATE_AGENT_WAIT == LLStartUp::getStartupState()) |
2096 | { | 2096 | { |
2097 | LL_DEBUGS("AppInitStartupState") << "STATE_AGENT_WAIT" << LL_ENDL; | 2097 | LL_DEBUGS("AppInitStartupState") << "STATE_AGENT_WAIT" << LL_ENDL; |
2098 | if (connecting_region_timer.getElapsedTimeF32() > TIMEOUT_SECONDS) | 2098 | if (connecting_region_timer.getElapsedTimeF32() > 15.0f) |
2099 | { | 2099 | { |
2100 | // Bounce back to the login screen -- MC | 2100 | // Bounce back to the login screen -- MC |
2101 | LL_WARNS("AppInit") << "Bad login - can't connect to this region for some reason" << LL_ENDL; | 2101 | LL_WARNS("AppInit") << "Bad login - can't connect to this region for some reason" << LL_ENDL; |
diff --git a/linden/indra/newview/llworld.cpp b/linden/indra/newview/llworld.cpp index 90ab49b..7cceb30 100644 --- a/linden/indra/newview/llworld.cpp +++ b/linden/indra/newview/llworld.cpp | |||
@@ -43,7 +43,9 @@ | |||
43 | #include "lldrawpool.h" | 43 | #include "lldrawpool.h" |
44 | #include "llglheaders.h" | 44 | #include "llglheaders.h" |
45 | #include "llhttpnode.h" | 45 | #include "llhttpnode.h" |
46 | #include "llpanellogin.h" | ||
46 | #include "llregionhandle.h" | 47 | #include "llregionhandle.h" |
48 | #include "llstartup.h" | ||
47 | #include "llsurface.h" | 49 | #include "llsurface.h" |
48 | #include "llviewercamera.h" | 50 | #include "llviewercamera.h" |
49 | #include "llviewerimage.h" | 51 | #include "llviewerimage.h" |
@@ -84,6 +86,7 @@ const F32 LLWorld::mWidthInMeters = mWidth * mScale; | |||
84 | // | 86 | // |
85 | // Functions | 87 | // Functions |
86 | // | 88 | // |
89 | bool connecting_alert_done(const LLSD& notification, const LLSD& response); | ||
87 | 90 | ||
88 | // allocate the stack | 91 | // allocate the stack |
89 | LLWorld::LLWorld() : | 92 | LLWorld::LLWorld() : |
@@ -263,7 +266,13 @@ void LLWorld::removeRegion(const LLHost &host) | |||
263 | llwarns << "gFrameTimeSeconds " << gFrameTimeSeconds << llendl; | 266 | llwarns << "gFrameTimeSeconds " << gFrameTimeSeconds << llendl; |
264 | 267 | ||
265 | llwarns << "Disabling region " << regionp->getName() << " that agent is in!" << llendl; | 268 | llwarns << "Disabling region " << regionp->getName() << " that agent is in!" << llendl; |
266 | LLAppViewer::instance()->forceDisconnect("You have been disconnected from the region you were in."); | 269 | |
270 | // Don't ever forceQuit on the user if we can avoid it -- MC | ||
271 | //LLAppViewer::instance()->forceDisconnect("You have been disconnected from the region you were in."); | ||
272 | LLSD args; | ||
273 | args["ERROR_MESSAGE"] = "You have been disconnected from the region you were in."; | ||
274 | LLNotifications::instance().add("ErrorMessage", args, LLSD(), connecting_alert_done); | ||
275 | |||
267 | return; | 276 | return; |
268 | } | 277 | } |
269 | 278 | ||
@@ -1243,6 +1252,20 @@ void LLWorld::getAvatars(std::vector<LLUUID>* avatar_ids, std::vector<LLVector3d | |||
1243 | } | 1252 | } |
1244 | } | 1253 | } |
1245 | 1254 | ||
1255 | bool connecting_alert_done(const LLSD& notification, const LLSD& response) | ||
1256 | { | ||
1257 | if (LLStartUp::getStartupState() < STATE_STARTED) | ||
1258 | { | ||
1259 | //LLStartUp::setLoginFailed(true); | ||
1260 | LLStartUp::resetLogin(); | ||
1261 | LLPanelLogin::giveFocus(); | ||
1262 | } | ||
1263 | else | ||
1264 | { | ||
1265 | LLAppViewer::instance()->requestLogout(false); | ||
1266 | } | ||
1267 | return false; | ||
1268 | } | ||
1246 | 1269 | ||
1247 | LLHTTPRegistration<LLEstablishAgentCommunication> | 1270 | LLHTTPRegistration<LLEstablishAgentCommunication> |
1248 | gHTTPRegistrationEstablishAgentCommunication( | 1271 | gHTTPRegistrationEstablishAgentCommunication( |