mirror of
https://github.com/opensim/opensim.git
synced 2026-05-14 18:55:39 +08:00
support parcel option restrict moap
This commit is contained in:
@@ -132,6 +132,7 @@ namespace OpenSim.Framework
|
||||
|
||||
/// <summary>
|
||||
/// Whether to obscure parcel media URL
|
||||
/// Now to obscure parcel MOAP
|
||||
/// </summary>
|
||||
[XmlIgnore]
|
||||
public bool ObscureMedia
|
||||
|
||||
@@ -59,5 +59,6 @@ namespace OpenSim.Framework
|
||||
public bool SeeAVs;
|
||||
public bool AnyAVSounds;
|
||||
public bool GroupAVSounds;
|
||||
public bool ObscureMOAP;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6543,11 +6543,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
LLSDxmlEncode2.AddElem("MediaWidth", landData.MediaWidth, sb);
|
||||
LLSDxmlEncode2.AddElem("MediaLoop", landData.MediaLoop, sb);
|
||||
LLSDxmlEncode2.AddElem("MediaType", landData.MediaType, sb);
|
||||
LLSDxmlEncode2.AddElem("ObscureMedia", landData.ObscureMedia, sb);
|
||||
LLSDxmlEncode2.AddElem("ObscureMusic", landData.ObscureMusic, sb);
|
||||
//LLSDxmlEncode2.AddElem("ObscureMedia", landData.ObscureMedia, sb);
|
||||
LLSDxmlEncode2.AddElem("ObscureMedia", false, sb); //obsolete
|
||||
//LLSDxmlEncode2.AddElem("ObscureMusic", landData.ObscureMusic, sb);
|
||||
LLSDxmlEncode2.AddElem("ObscureMusic", false, sb); //obsolete
|
||||
|
||||
LLSDxmlEncode2.AddEndMapAndArray(sb);
|
||||
|
||||
LLSDxmlEncode2.AddArrayAndMap("ParcelExtendedFlags", sb); // obscure moap
|
||||
LLSDxmlEncode2.AddElem("Flags", (uint)(landData.ObscureMedia ? 1 : (int)0), sb);
|
||||
LLSDxmlEncode2.AddEndMapAndArray(sb);
|
||||
|
||||
LLSDxmlEncode2.AddArrayAndMap("AgeVerificationBlock", sb);
|
||||
|
||||
LLSDxmlEncode2.AddElem("RegionDenyAgeUnverified", (regionFlags & (uint)RegionFlags.DenyAgeUnverified) != 0, sb);
|
||||
|
||||
@@ -1459,11 +1459,11 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
|
||||
// now flags
|
||||
// local sound
|
||||
if ((currentParcel.LandData.Flags & (uint)ParcelFlags.SoundLocal) != 0)
|
||||
if ((currentParcelLandData.Flags & (uint)ParcelFlags.SoundLocal) != 0)
|
||||
curByte |= (byte)LandChannel.LAND_FLAG_LOCALSOUND;
|
||||
|
||||
// hide avatars
|
||||
if (!currentParcel.LandData.SeeAVs)
|
||||
if (!currentParcelLandData.SeeAVs)
|
||||
curByte |= (byte)LandChannel.LAND_FLAG_HIDEAVATARS;
|
||||
|
||||
// border flags for current
|
||||
@@ -2088,8 +2088,12 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
land_update.MediaWidth = properties.MediaWidth;
|
||||
land_update.MediaHeight = properties.MediaHeight;
|
||||
land_update.MediaLoop = properties.MediaLoop;
|
||||
land_update.ObscureMusic = properties.ObscureMusic;
|
||||
land_update.ObscureMedia = properties.ObscureMedia;
|
||||
//land_update.ObscureMusic = properties.ObscureMusic;
|
||||
//land_update.ObscureMedia = properties.ObscureMedia;
|
||||
|
||||
land_update.ObscureMedia = false; // obsolete
|
||||
if (args.TryGetValue("obscure_moap", out OSD omoap))
|
||||
land_update.ObscureMOAP = omoap.AsBoolean();
|
||||
|
||||
if (args.ContainsKey("see_avs"))
|
||||
{
|
||||
@@ -2810,7 +2814,8 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
cdl.AddRow("Media Width", ld.MediaWidth);
|
||||
cdl.AddRow("Media Height", ld.MediaHeight);
|
||||
cdl.AddRow("Media Loop", ld.MediaLoop);
|
||||
cdl.AddRow("Obscure Media", ld.ObscureMedia);
|
||||
|
||||
cdl.AddRow("Obscure MOAP", ld.ObscureMedia);
|
||||
|
||||
cdl.AddRow("Parcel Category", ld.Category);
|
||||
|
||||
|
||||
@@ -614,8 +614,10 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
newData.MediaWidth = args.MediaWidth;
|
||||
newData.MediaHeight = args.MediaHeight;
|
||||
newData.MediaLoop = args.MediaLoop;
|
||||
newData.ObscureMusic = args.ObscureMusic;
|
||||
newData.ObscureMedia = args.ObscureMedia;
|
||||
//newData.ObscureMusic = args.ObscureMusic;
|
||||
newData.ObscureMusic = false; // obsolete
|
||||
//newData.ObscureMedia = args.ObscureMedia;
|
||||
newData.ObscureMedia = args.ObscureMOAP; // obsolete, reuse for moap
|
||||
|
||||
allowedDelta |= (uint)(ParcelFlags.SoundLocal |
|
||||
ParcelFlags.UrlWebPage |
|
||||
|
||||
Reference in New Issue
Block a user