summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llagent.cpp')
-rwxr-xr-xindra/newview/llagent.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 3f32be1d68..a2211d7356 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -3849,6 +3849,7 @@ void LLAgent::startTeleportRequest()
}
if (hasPendingTeleportRequest())
{
+ mTeleportCanceled.reset();
if (!isMaturityPreferenceSyncedWithServer())
{
gTeleportDisplay = TRUE;
@@ -3878,6 +3879,7 @@ void LLAgent::startTeleportRequest()
void LLAgent::handleTeleportFinished()
{
clearTeleportRequest();
+ mTeleportCanceled.reset();
if (mIsMaturityRatingChangingDuringTeleport)
{
// notify user that the maturity preference has been changed
@@ -4021,13 +4023,25 @@ void LLAgent::teleportCancel()
msg->addUUIDFast(_PREHASH_AgentID, getID());
msg->addUUIDFast(_PREHASH_SessionID, getSessionID());
sendReliableMessage();
- }
+ }
+ mTeleportCanceled = mTeleportRequest;
}
clearTeleportRequest();
gAgent.setTeleportState( LLAgent::TELEPORT_NONE );
gPipeline.resetVertexBuffers();
}
+void LLAgent::restoreCanceledTeleportRequest()
+{
+ if (mTeleportCanceled != NULL)
+ {
+ gAgent.setTeleportState( LLAgent::TELEPORT_REQUESTED );
+ mTeleportRequest = mTeleportCanceled;
+ mTeleportCanceled.reset();
+ gTeleportDisplay = TRUE;
+ gTeleportDisplayTimer.reset();
+ }
+}
void LLAgent::teleportViaLocation(const LLVector3d& pos_global)
{