From dfa9780c8c09c795bdd0dec6174ee8680c534e47 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Tue, 29 Jul 2014 04:19:01 +0200
Subject: Send new parcel permissions to activate viewer options - done right
this time
---
OpenSim/Framework/LandData.cs | 30 ++++++++++++++--------
.../Region/ClientStack/Linden/UDP/LLClientView.cs | 10 +++++---
2 files changed, 26 insertions(+), 14 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Framework/LandData.cs b/OpenSim/Framework/LandData.cs
index 4dffd3f..4fbbbc1 100644
--- a/OpenSim/Framework/LandData.cs
+++ b/OpenSim/Framework/LandData.cs
@@ -99,6 +99,10 @@ namespace OpenSim.Framework
private bool _obscureMedia = false;
private float _dwell = 0;
+ public bool SeeAVs { get; set; }
+ public bool AnyAVSounds { get; set; }
+ public bool GroupAVSounds { get; set; }
+
///
/// Traffic count of parcel
///
@@ -728,6 +732,9 @@ namespace OpenSim.Framework
public LandData()
{
_globalID = UUID.Random();
+ SeeAVs = true;
+ AnyAVSounds = true;
+ GroupAVSounds = true;
}
///
@@ -778,6 +785,9 @@ namespace OpenSim.Framework
landData._simwideArea = _simwideArea;
landData._simwidePrims = _simwidePrims;
landData._dwell = _dwell;
+ landData.SeeAVs = SeeAVs;
+ landData.AnyAVSounds = AnyAVSounds;
+ landData.GroupAVSounds = GroupAVSounds;
landData._parcelAccessList.Clear();
foreach (LandAccessEntry entry in _parcelAccessList)
@@ -793,21 +803,21 @@ namespace OpenSim.Framework
return landData;
}
- public void ToXml(XmlWriter xmlWriter)
- {
- serializer.Serialize(xmlWriter, this);
- }
+// public void ToXml(XmlWriter xmlWriter)
+// {
+// serializer.Serialize(xmlWriter, this);
+// }
///
/// Restore a LandData object from the serialized xml representation.
///
///
///
- public static LandData FromXml(XmlReader xmlReader)
- {
- LandData land = (LandData)serializer.Deserialize(xmlReader);
-
- return land;
- }
+// public static LandData FromXml(XmlReader xmlReader)
+// {
+// LandData land = (LandData)serializer.Deserialize(xmlReader);
+//
+// return land;
+// }
}
}
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 969d946..3c44c5f 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -4976,10 +4976,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
OSD message_body = updateMessage.Serialize();
// Add new fields here until OMV has them
- OSDMap parcelData = (OSDMap)message_body;
- parcelData["SeeAVs"] = OSD.FromBoolean(true);
- parcelData["AnyAVSounds"] = OSD.FromBoolean(true);
- parcelData["GroupAVSounds"] = OSD.FromBoolean(true);
+ OSDMap bodyMap = (OSDMap)message_body;
+ OSDArray parcelDataArray = (OSDArray)bodyMap["ParcelData"];
+ OSDMap parcelData = (OSDMap)parcelDataArray[0];
+ parcelData["SeeAVs"] = OSD.FromBoolean(landData.SeeAVs);
+ parcelData["AnyAVSounds"] = OSD.FromBoolean(landData.AnyAVSounds);
+ parcelData["GroupAVSounds"] = OSD.FromBoolean(landData.GroupAVSounds);
OSDMap message = new OSDMap();
message.Add("message", OSD.FromString("ParcelProperties"));
message.Add("body", message_body);
--
cgit v1.1