summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerparcelmgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerparcelmgr.cpp')
-rw-r--r--indra/newview/llviewerparcelmgr.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 8c24b2438b..d92341eb96 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -1750,6 +1750,8 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
{
instance->mTeleportFinishedSignal(instance->mTeleportInProgressPosition, false);
}
+ instance->postTeleportFinished(instance->mTeleportWithinRegion);
+ instance->mTeleportWithinRegion = false;
}
parcel->setParcelEnvironmentVersion(parcel_environment_version);
LL_DEBUGS("ENVIRONMENT") << "Parcel environment version is " << parcel->getParcelEnvironmentVersion() << LL_ENDL;
@@ -2709,6 +2711,8 @@ void LLViewerParcelMgr::onTeleportFinished(bool local, const LLVector3d& new_pos
// Local teleport. We already have the agent parcel data.
// Emit the signal immediately.
getInstance()->mTeleportFinishedSignal(new_pos, local);
+
+ postTeleportFinished(true);
}
else
{
@@ -2717,12 +2721,14 @@ void LLViewerParcelMgr::onTeleportFinished(bool local, const LLVector3d& new_pos
// Let's wait for the update and then emit the signal.
mTeleportInProgressPosition = new_pos;
mTeleportInProgress = true;
+ mTeleportWithinRegion = local;
}
}
void LLViewerParcelMgr::onTeleportFailed()
{
mTeleportFailedSignal();
+ LLEventPumps::instance().obtain("LLTeleport").post(llsd::map("success", false));
}
bool LLViewerParcelMgr::getTeleportInProgress()
@@ -2730,3 +2736,17 @@ bool LLViewerParcelMgr::getTeleportInProgress()
return mTeleportInProgress // case where parcel data arrives after teleport
|| gAgent.getTeleportState() > LLAgent::TELEPORT_NONE; // For LOCAL, no mTeleportInProgress
}
+
+void LLViewerParcelMgr::postTeleportFinished(bool local)
+{
+ auto post = []() { LLEventPumps::instance().obtain("LLTeleport").post(llsd::map("success", true)); };
+ if (local)
+ {
+ static LLCachedControl<F32> teleport_local_delay(gSavedSettings, "TeleportLocalDelay");
+ LL::Timers::instance().scheduleAfter(post, teleport_local_delay + 0.5f);
+ }
+ else
+ {
+ post();
+ }
+}