summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llvieweraudio.cpp8
-rw-r--r--indra/newview/llvieweraudio.h3
-rwxr-xr-xindra/newview/llviewermessage.cpp5
-rw-r--r--indra/newview/llviewermessage.h12
4 files changed, 25 insertions, 3 deletions
diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp
index 2ef159ff31..7ac0d3aeaa 100644
--- a/indra/newview/llvieweraudio.cpp
+++ b/indra/newview/llvieweraudio.cpp
@@ -41,6 +41,7 @@
#include "llstartup.h"
#include "llviewerparcelmgr.h"
#include "llparcel.h"
+#include "llviewermessage.h"
/////////////////////////////////////////////////////////
@@ -56,6 +57,8 @@ LLViewerAudio::LLViewerAudio() :
setTeleportFailedCallback(boost::bind(&LLViewerAudio::onTeleportFailed, this));
mTeleportFinishedConnection = LLViewerParcelMgr::getInstance()->
setTeleportFinishedCallback(boost::bind(&LLViewerAudio::onTeleportFinished, this, _1, _2));
+ mTeleportStartedConnection = LLViewerMessage::getInstance()->
+ setTeleportStartedCallback(boost::bind(&LLViewerAudio::onTeleportStarted, this));
}
LLViewerAudio::~LLViewerAudio()
@@ -249,6 +252,11 @@ F32 LLViewerAudio::getFadeVolume()
return fade_volume;
}
+void LLViewerAudio::onTeleportStarted()
+{
+llwarns << "DBG teleport started" << llendl;
+}
+
void LLViewerAudio::onTeleportFailed()
{
// Calling audio_update_volume makes sure that the music stream is properly set to be restored to
diff --git a/indra/newview/llvieweraudio.h b/indra/newview/llvieweraudio.h
index 38c977c605..8c302c6549 100644
--- a/indra/newview/llvieweraudio.h
+++ b/indra/newview/llvieweraudio.h
@@ -80,13 +80,14 @@ private:
bool mWasPlaying;
boost::signals2::connection mTeleportFailedConnection;
boost::signals2::connection mTeleportFinishedConnection;
+ boost::signals2::connection mTeleportStartedConnection;
void registerIdleListener();
void deregisterIdleListener() { mIdleListnerActive = false; };
void startFading();
void onTeleportFailed();
void onTeleportFinished(const LLVector3d& pos, const bool& local);
-
+ void onTeleportStarted();
};
#endif //LL_VIEWER_H
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 3c6770df43..33ce8a79e1 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -3441,6 +3441,11 @@ void process_teleport_start(LLMessageSystem *msg, void**)
}
}
+boost::signals2::connection LLViewerMessage::setTeleportStartedCallback(teleport_started_callback_t cb)
+{
+ return mTeleportStartedSignal.connect(cb);
+}
+
void process_teleport_progress(LLMessageSystem* msg, void**)
{
LLUUID agent_id;
diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h
index d8acd99953..e4fc77c06d 100644
--- a/indra/newview/llviewermessage.h
+++ b/indra/newview/llviewermessage.h
@@ -204,6 +204,16 @@ bool highlight_offered_object(const LLUUID& obj_id);
void set_dad_inventory_item(LLInventoryItem* inv_item, const LLUUID& into_folder_uuid);
void set_dad_inbox_object(const LLUUID& object_id);
+class LLViewerMessage : public LLSingleton<LLViewerMessage>
+{
+public:
+ typedef boost::function<void()> teleport_started_callback_t;
+ typedef boost::signals2::signal<void()> teleport_started_signal_t;
+ boost::signals2::connection setTeleportStartedCallback(teleport_started_callback_t cb);
+
+protected:
+ teleport_started_signal_t mTeleportStartedSignal;
+};
class LLOfferInfo : public LLNotificationResponderInterface
{
@@ -252,5 +262,3 @@ private:
void process_feature_disabled_message(LLMessageSystem* msg, void**);
#endif
-
-