summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2015-11-20 10:24:16 -0800
committerRider Linden <rider@lindenlab.com>2015-11-20 10:24:16 -0800
commit40b085dfece81e155f336f39cb1d5bd7e3154991 (patch)
treef927486757e7e95e867af413396ddad9674e8d13 /indra/newview
parent429729b592854d724e669706b850c80df1ae0eea (diff)
MAINT-5831: If there is a teleport request active and it has failed, teleport state will always return "None".
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llagent.cpp7
-rwxr-xr-xindra/newview/llagent.h2
2 files changed, 8 insertions, 1 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 7f238a9a3b..157eb7d662 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -4084,6 +4084,13 @@ void LLAgent::doTeleportViaLocationLookAt(const LLVector3d& pos_global)
teleportRequest(region_handle, pos_local, getTeleportKeepsLookAt());
}
+LLAgent::ETeleportState LLAgent::getTeleportState() const
+{
+ return (mTeleportRequest && (mTeleportRequest->getStatus() == LLTeleportRequest::kFailed)) ?
+ TELEPORT_NONE : mTeleportState;
+}
+
+
void LLAgent::setTeleportState(ETeleportState state)
{
if (mTeleportRequest && (state != TELEPORT_NONE) && (mTeleportRequest->getStatus() == LLTeleportRequest::kFailed))
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index d46973ddee..af8bd50c5d 100755
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -676,7 +676,7 @@ private:
// Teleport State
//--------------------------------------------------------------------
public:
- ETeleportState getTeleportState() const { return mTeleportState; }
+ ETeleportState getTeleportState() const;
void setTeleportState(ETeleportState state);
private:
ETeleportState mTeleportState;