MAINT-5831: If there is a teleport request active and it has failed, teleport state will always return "None".

meow-7.2.2
Rider Linden 2015-11-20 10:24:16 -08:00
parent 429729b592
commit 40b085dfec
2 changed files with 8 additions and 1 deletions

View File

@ -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))

View File

@ -676,7 +676,7 @@ private:
// Teleport State
//--------------------------------------------------------------------
public:
ETeleportState getTeleportState() const { return mTeleportState; }
ETeleportState getTeleportState() const;
void setTeleportState(ETeleportState state);
private:
ETeleportState mTeleportState;