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.

meow-7.2.2
Todd Stinson 2012-05-29 18:02:38 -07:00
parent 8ff00d6ecf
commit fbf01e9c2a
4 changed files with 39 additions and 18 deletions

View File

@ -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;
}
}
}
}

View File

@ -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:

View File

@ -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:

View File

@ -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>