diff options
author | Todd Stinson <stinson@lindenlab.com> | 2012-06-01 15:16:28 -0700 |
---|---|---|
committer | Todd Stinson <stinson@lindenlab.com> | 2012-06-01 15:16:28 -0700 |
commit | 0a90524439351e93881216344f04dcd8e3171289 (patch) | |
tree | de14404d9c0a3c211ec4a17e08cc6fab06e2d65c /indra | |
parent | fabc4e470b338c1f7d09fa86373ca82d7a08532d (diff) |
EXP-1942: Ensuring that the teleport cancel works in the case of restarting a teleport. Also, ensuring to pull down the teleport screen if we time out of a maturity request with a pending teleport queued.
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/llagent.cpp | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index f7575be75d..12d0de0347 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -2666,7 +2666,7 @@ void LLAgent::handlePreferredMaturityError() { llwarns << "Got an error but maturity preference '" << LLViewerRegion::accessToString(mLastKnownRequestMaturity) << "' seems to be in sync with the server" << llendl; - mMaturityPreferenceNumRetries = 0; + reportPreferredMaturitySuccess(); } // Else, the more likely case is that the last request does not match the last response, // so inform the user @@ -2679,6 +2679,8 @@ void LLAgent::handlePreferredMaturityError() void LLAgent::reportPreferredMaturitySuccess() { + // If there is a pending teleport request waiting for the maturity preference to be synced with + // the server, let's start the pending request if (hasPendingTeleportRequest()) { startTeleportRequest(); @@ -2687,6 +2689,14 @@ void LLAgent::reportPreferredMaturitySuccess() void LLAgent::reportPreferredMaturityError() { + // If there is a pending teleport request waiting for the maturity preference to be synced with + // the server, we were unable to successfully sync with the server on maturity preference, so let's + // just raise the screen. + if (hasPendingTeleportRequest()) + { + setTeleportState(LLAgent::TELEPORT_NONE); + } + // Get the last known maturity request from the user activity std::string preferredMaturity = LLViewerRegion::accessToString(mLastKnownRequestMaturity); LLStringUtil::toLower(preferredMaturity); @@ -3994,19 +4004,21 @@ void LLAgent::doTeleportViaLure(const LLUUID& lure_id, BOOL godlike) // James Cook, July 28, 2005 void LLAgent::teleportCancel() { - clearTeleportRequest(); - LLViewerRegion* regionp = getRegion(); - if(regionp) + if (!hasPendingTeleportRequest()) { - // send the message - LLMessageSystem* msg = gMessageSystem; - msg->newMessage("TeleportCancel"); - msg->nextBlockFast(_PREHASH_Info); - msg->addUUIDFast(_PREHASH_AgentID, getID()); - msg->addUUIDFast(_PREHASH_SessionID, getSessionID()); - sendReliableMessage(); - } - gTeleportDisplay = FALSE; + LLViewerRegion* regionp = getRegion(); + if(regionp) + { + // send the message + LLMessageSystem* msg = gMessageSystem; + msg->newMessage("TeleportCancel"); + msg->nextBlockFast(_PREHASH_Info); + msg->addUUIDFast(_PREHASH_AgentID, getID()); + msg->addUUIDFast(_PREHASH_SessionID, getSessionID()); + sendReliableMessage(); + } + } + clearTeleportRequest(); gAgent.setTeleportState( LLAgent::TELEPORT_NONE ); } |