summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llagent.cpp38
-rw-r--r--indra/newview/llagent.h3
-rw-r--r--indra/newview/llviewerdisplay.cpp11
-rw-r--r--indra/newview/skins/default/xui/en/teleport_strings.xml5
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 &apos;Welcome Island Public&apos; to repeat the tutorial.
<message name="requesting">
Requesting Teleport...
</message>
- </message_set>
+ <message name="pending">
+ Pending Teleport...
+ </message>
+ </message_set>
</teleport_messages>