summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.cpp
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2015-12-21 19:22:40 +0200
committerandreykproductengine <akleshchev@productengine.com>2015-12-21 19:22:40 +0200
commit49fa9b5515e708083c85aaa2b1b522bc266944c4 (patch)
tree81053c34231e98de57005b74be314bd38362db36 /indra/newview/llagent.cpp
parent7ce37f9910016f7225621df9e70dd2fd7c41725d (diff)
MAINT-335 FIXED Avatar hangs in space after cancelling teleport
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)
{