summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerregion.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2015-01-13 17:18:15 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2015-01-13 17:18:15 -0500
commitd5ab47b1bc9eac98c1f443fa965a91a8f2cf0af7 (patch)
treebc50c7b6a71bb9b5a800bdb7c9ffea6f47c4483f /indra/newview/llviewerregion.cpp
parentee63c30ea748857f68ac352a9751816644322ec3 (diff)
SL-92 WIP - added signal for simulator features received. Use to keep hover floater UI synced with region support for hover.
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rwxr-xr-xindra/newview/llviewerregion.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 11cbf3fc24..b05e771f96 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -424,6 +424,7 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
mCacheDirty(FALSE),
mReleaseNotesRequested(FALSE),
mCapabilitiesReceived(false),
+ mSimulatorFeaturesReceived(false),
mBitsReceived(0.f),
mPacketsReceived(0.f),
mDead(FALSE),
@@ -2027,6 +2028,26 @@ void LLViewerRegion::getInfo(LLSD& info)
info["Region"]["Handle"]["y"] = (LLSD::Integer)y;
}
+boost::signals2::connection LLViewerRegion::setSimulatorFeaturesReceivedCallback(const caps_received_signal_t::slot_type& cb)
+{
+ return mSimulatorFeaturesReceivedSignal.connect(cb);
+}
+
+void LLViewerRegion::setSimulatorFeaturesReceived(bool received)
+{
+ mSimulatorFeaturesReceived = received;
+ if (received)
+ {
+ mSimulatorFeaturesReceivedSignal(getRegionID());
+ mSimulatorFeaturesReceivedSignal.disconnect_all_slots();
+ }
+}
+
+bool LLViewerRegion::simulatorFeaturesReceived() const
+{
+ return mSimulatorFeaturesReceived;
+}
+
void LLViewerRegion::getSimulatorFeatures(LLSD& sim_features) const
{
sim_features = mSimulatorFeatures;
@@ -2040,6 +2061,9 @@ void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features)
LLSDSerialize::toPrettyXML(sim_features, str);
LL_INFOS() << str.str() << LL_ENDL;
mSimulatorFeatures = sim_features;
+
+ setSimulatorFeaturesReceived(true);
+
}
//this is called when the parent is not cacheable.
@@ -3088,6 +3112,12 @@ bool LLViewerRegion::dynamicPathfindingEnabled() const
return ( mSimulatorFeatures.has("DynamicPathfindingEnabled") &&
mSimulatorFeatures["DynamicPathfindingEnabled"].asBoolean());
}
+
+bool LLViewerRegion::avatarHoverHeightEnabled() const
+{
+ return ( mSimulatorFeatures.has("AvatarHoverHeightEnabled") &&
+ mSimulatorFeatures["AvatarHoverHeightEnabled"].asBoolean());
+}
/* Static Functions */
void log_capabilities(const CapabilityMap &capmap)