diff options
author | Todd Stinson <stinson@lindenlab.com> | 2012-05-29 18:02:38 -0700 |
---|---|---|
committer | Todd Stinson <stinson@lindenlab.com> | 2012-05-29 18:02:38 -0700 |
commit | fbf01e9c2a919fb51df2c6d71fa9d673ca69c1a8 (patch) | |
tree | c1b9f706ce0064b0131b0570a33fb6062d5c9bd1 | |
parent | 8ff00d6ecfb733876126fb5a2ebae6fe20e38f6f (diff) |
EXP-1942,EXP-1945: Pulling down the teleport screen in the scenario of waiting for a maturity preference change that is still being posted to the server.
-rwxr-xr-x | indra/newview/llagent.cpp | 38 | ||||
-rw-r--r-- | indra/newview/llagent.h | 3 | ||||
-rw-r--r-- | indra/newview/llviewerdisplay.cpp | 11 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/teleport_strings.xml | 5 |
4 files changed, 39 insertions, 18 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 481abdceff..24a71f100a 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -3727,7 +3727,7 @@ void LLAgent::clearVisualParams(void *data) // protected bool LLAgent::teleportCore(bool is_local) { - if(TELEPORT_NONE != mTeleportState) + if ((TELEPORT_NONE != mTeleportState) && (mTeleportState != TELEPORT_PENDING)) { llwarns << "Attempt to teleport when already teleporting." << llendl; return false; @@ -3840,22 +3840,30 @@ bool LLAgent::hasPendingTeleportRequest() void LLAgent::startTeleportRequest() { - if (hasPendingTeleportRequest() && isMaturityPreferenceSyncedWithServer()) + if (hasPendingTeleportRequest()) { - switch (mTeleportRequest->getStatus()) + if (!isMaturityPreferenceSyncedWithServer()) { - case LLTeleportRequest::kPending : - mTeleportRequest->setStatus(LLTeleportRequest::kStarted); - mTeleportRequest->startTeleport(); - break; - case LLTeleportRequest::kRestartPending : - llassert(mTeleportRequest->canRestartTeleport()); - mTeleportRequest->setStatus(LLTeleportRequest::kStarted); - mTeleportRequest->restartTeleport(); - break; - default : - llassert(0); - break; + gTeleportDisplay = TRUE; + setTeleportState(TELEPORT_PENDING); + } + else + { + switch (mTeleportRequest->getStatus()) + { + case LLTeleportRequest::kPending : + mTeleportRequest->setStatus(LLTeleportRequest::kStarted); + mTeleportRequest->startTeleport(); + break; + case LLTeleportRequest::kRestartPending : + llassert(mTeleportRequest->canRestartTeleport()); + mTeleportRequest->setStatus(LLTeleportRequest::kStarted); + mTeleportRequest->restartTeleport(); + break; + default : + llassert(0); + break; + } } } } diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 51c3c18c2e..a505d5bbae 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -544,7 +544,8 @@ public: TELEPORT_MOVING = 3, // Viewer has received destination location from source simulator TELEPORT_START_ARRIVAL = 4, // Transition to ARRIVING. Viewer has received avatar update, etc., from destination simulator TELEPORT_ARRIVING = 5, // Make the user wait while content "pre-caches" - TELEPORT_LOCAL = 6 // Teleporting in-sim without showing the progress screen + TELEPORT_LOCAL = 6, // Teleporting in-sim without showing the progress screen + TELEPORT_PENDING = 7 }; public: diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 0adb187dd2..1afe0d4050 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -383,15 +383,24 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) const std::string& message = gAgent.getTeleportMessage(); switch( gAgent.getTeleportState() ) { + case LLAgent::TELEPORT_PENDING: + gTeleportDisplayTimer.reset(); + gViewerWindow->setShowProgress(TRUE); + gViewerWindow->setProgressPercent(llmin(teleport_percent, 0.0f)); + gAgent.setTeleportMessage(LLAgent::sTeleportProgressMessages["pending"]); + gViewerWindow->setProgressString(LLAgent::sTeleportProgressMessages["pending"]); + break; + case LLAgent::TELEPORT_START: // Transition to REQUESTED. Viewer has sent some kind // of TeleportRequest to the source simulator gTeleportDisplayTimer.reset(); gViewerWindow->setShowProgress(TRUE); - gViewerWindow->setProgressPercent(0); + gViewerWindow->setProgressPercent(llmin(teleport_percent, 0.0f)); gAgent.setTeleportState( LLAgent::TELEPORT_REQUESTED ); gAgent.setTeleportMessage( LLAgent::sTeleportProgressMessages["requesting"]); + gViewerWindow->setProgressString(LLAgent::sTeleportProgressMessages["requesting"]); break; case LLAgent::TELEPORT_REQUESTED: diff --git a/indra/newview/skins/default/xui/en/teleport_strings.xml b/indra/newview/skins/default/xui/en/teleport_strings.xml index 81a3746bd9..fdf41991cd 100644 --- a/indra/newview/skins/default/xui/en/teleport_strings.xml +++ b/indra/newview/skins/default/xui/en/teleport_strings.xml @@ -83,5 +83,8 @@ Go to 'Welcome Island Public' to repeat the tutorial. <message name="requesting"> Requesting Teleport... </message> - </message_set> + <message name="pending"> + Pending Teleport... + </message> + </message_set> </teleport_messages> |