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 /indra/newview/llagent.cpp | |
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.
Diffstat (limited to 'indra/newview/llagent.cpp')
-rwxr-xr-x | indra/newview/llagent.cpp | 38 |
1 files changed, 23 insertions, 15 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; + } } } } |