summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2014-03-21 22:20:59 +0200
committerandreykproductengine <akleshchev@productengine.com>2014-03-21 22:20:59 +0200
commit5a76ebc069f86b4e31e74512dba0af2edaa6f628 (patch)
treef5715b21dad416143b5c79bd3770fbab46c7c4fd /indra/newview
parent7698e169f55c41f99b3a35b9a54f55984faf2473 (diff)
MAINT-1805 FIXED "Back" button doesn't teleport user to correct location after performing several teleports to a different locations
Agent position gets reseted frequently while not all varibles are uptadet, as result it is not reliable for inter-region teleportation. Changed to value from message.
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llviewerparcelmgr.cpp12
-rwxr-xr-xindra/newview/llviewerparcelmgr.h1
2 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index e361fad9de..04f02872f3 100755
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -118,6 +118,7 @@ LLViewerParcelMgr::LLViewerParcelMgr()
mHoverRequestResult(0),
mHoverWestSouth(),
mHoverEastNorth(),
+ mTeleportInProgressPosition(),
mRenderCollision(FALSE),
mRenderSelection(TRUE),
mCollisionBanned(0),
@@ -1586,7 +1587,15 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
if (instance->mTeleportInProgress)
{
instance->mTeleportInProgress = FALSE;
- instance->mTeleportFinishedSignal(gAgent.getPositionGlobal(), false);
+ if(instance->mTeleportInProgressPosition.isNull())
+ {
+ //initial update
+ instance->mTeleportFinishedSignal(gAgent.getPositionGlobal(), false);
+ }
+ else
+ {
+ instance->mTeleportFinishedSignal(instance->mTeleportInProgressPosition, false);
+ }
}
}
}
@@ -2495,6 +2504,7 @@ void LLViewerParcelMgr::onTeleportFinished(bool local, const LLVector3d& new_pos
// Non-local teleport (inter-region or between different parcels of the same region).
// The agent parcel data has not been updated yet.
// Let's wait for the update and then emit the signal.
+ mTeleportInProgressPosition = new_pos;
mTeleportInProgress = TRUE;
}
}
diff --git a/indra/newview/llviewerparcelmgr.h b/indra/newview/llviewerparcelmgr.h
index 9da49bb3f3..ee8d4778d9 100755
--- a/indra/newview/llviewerparcelmgr.h
+++ b/indra/newview/llviewerparcelmgr.h
@@ -336,6 +336,7 @@ private:
LLDynamicArray<LLParcelObserver*> mObservers;
BOOL mTeleportInProgress;
+ LLVector3d mTeleportInProgressPosition;
teleport_finished_signal_t mTeleportFinishedSignal;
teleport_failed_signal_t mTeleportFailedSignal;