summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llappearancelistener.cpp2
-rw-r--r--indra/newview/llviewerparcelmgr.cpp24
-rw-r--r--indra/newview/llviewerparcelmgr.h4
3 files changed, 29 insertions, 1 deletions
diff --git a/indra/newview/llappearancelistener.cpp b/indra/newview/llappearancelistener.cpp
index 65cdf2e11b..a6d6e76e02 100644
--- a/indra/newview/llappearancelistener.cpp
+++ b/indra/newview/llappearancelistener.cpp
@@ -137,7 +137,7 @@ void LLAppearanceListener::getOutfitItems(LLSD const &data)
LLViewerInventoryCategory *cat = gInventory.getCategory(outfit_id);
if (!cat || cat->getPreferredType() != LLFolderType::FT_OUTFIT)
{
- return response.error(stringize(LLTrans::getString("OutfitNotFound"), outfit_id.asString()));
+ return response.error(stringize("Couldn't find outfit ", outfit_id.asString()));
}
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t item_array;
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 8e6657b4b9..66a19d3601 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -42,6 +42,7 @@
// Viewer includes
#include "llagent.h"
#include "llagentaccess.h"
+#include "llcallbacklist.h"
#include "llviewerparcelaskplay.h"
#include "llviewerwindow.h"
#include "llviewercontrol.h"
@@ -1750,6 +1751,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;
@@ -2719,6 +2722,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
{
@@ -2727,12 +2732,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()
@@ -2740,3 +2747,20 @@ 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");
+ doAfterInterval(post, teleport_local_delay + 0.5f);
+ }
+ else
+ {
+ post();
+ }
+}
diff --git a/indra/newview/llviewerparcelmgr.h b/indra/newview/llviewerparcelmgr.h
index 974ea39359..95d693662e 100644
--- a/indra/newview/llviewerparcelmgr.h
+++ b/indra/newview/llviewerparcelmgr.h
@@ -295,6 +295,8 @@ public:
void onTeleportFailed();
bool getTeleportInProgress();
+ void postTeleportFinished(bool local);
+
static bool isParcelOwnedByAgent(const LLParcel* parcelp, U64 group_proxy_power);
static bool isParcelModifiableByAgent(const LLParcel* parcelp, U64 group_proxy_power);
@@ -344,7 +346,9 @@ private:
std::vector<LLParcelObserver*> mObservers;
+ // Used to communicate between onTeleportFinished() and processParcelProperties()
bool mTeleportInProgress;
+ bool mTeleportWithinRegion{ false };
LLVector3d mTeleportInProgressPosition;
teleport_finished_signal_t mTeleportFinishedSignal;
teleport_failed_signal_t mTeleportFailedSignal;