diff --git a/OpenSim/Capabilities/Handlers/GetAssets/GetAssetsHandler.cs b/OpenSim/Capabilities/Handlers/GetAssets/GetAssetsHandler.cs index a5f0056d7b..faac9dc0b9 100644 --- a/OpenSim/Capabilities/Handlers/GetAssets/GetAssetsHandler.cs +++ b/OpenSim/Capabilities/Handlers/GetAssets/GetAssetsHandler.cs @@ -68,7 +68,8 @@ namespace OpenSim.Capabilities.Handlers {"jpeg_id", AssetType.ImageJPEG}, {"animatn_id", AssetType.Animation}, {"gesture_id", AssetType.Gesture}, - {"mesh_id", AssetType.Mesh} + {"mesh_id", AssetType.Mesh}, + {"settings_id", AssetType.Settings} }; private IAssetService m_assetService; @@ -136,7 +137,7 @@ namespace OpenSim.Capabilities.Handlers return responsedata; } - if(type == AssetType.Mesh || type == AssetType.Texture) + if (type == AssetType.Mesh || type == AssetType.Texture) responsedata["throttle"] = true; responsedata["content_type"] = asset.Metadata.ContentType; diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs index 764528832f..983b491815 100644 --- a/OpenSim/Framework/EstateSettings.cs +++ b/OpenSim/Framework/EstateSettings.cs @@ -237,6 +237,8 @@ namespace OpenSim.Framework set { m_DenyMinors = value; } } + public bool AllowEnviromentOverride {get; set;} = true; + // All those lists... // private List l_EstateManagers = new List(); diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EstateChangeInfo.cs b/OpenSim/Region/ClientStack/Linden/Caps/EstateChangeInfo.cs index e5d18f8448..7e095d356a 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EstateChangeInfo.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EstateChangeInfo.cs @@ -200,9 +200,13 @@ namespace OpenSim.Region.ClientStack.Linden if (r.ContainsKey("override_public_access")) overridePublicAccess = !r["override_public_access"].AsBoolean(); + bool allowEnviromentOverride = m_scene.RegionInfo.EstateSettings.AllowEnviromentOverride; + if (r.ContainsKey("override_environment")) + allowEnviromentOverride = !r["override_environment"].AsBoolean(); + ok = m_EstateModule.handleEstateChangeInfoCap(estateName, invoice, sunHour, sunFixed, externallyVisible, allowDirectTeleport, denyAnonymous, denyAgeUnverified, - alloVoiceChat, overridePublicAccess); + alloVoiceChat, overridePublicAccess, allowEnviromentOverride); } catch { diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 4303769b66..d05b578ebb 100755 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -827,8 +827,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP // allow access override (was taxfree) if (!Scene.RegionInfo.EstateSettings.TaxFree) // this is now wrong means !ALLOW_ACCESS_OVERRIDE - //flags |= RegionFlags.AllowParcelAccessOverride; - flags |= RegionFlags.TaxFree; + flags |= RegionFlags.AllowParcelAccessOverride; if (Scene.RegionInfo.RegionSettings.BlockTerraform) flags |= RegionFlags.BlockTerraform; @@ -6607,9 +6606,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP LLSDxmlEncode.AddEndMapAndArray(sb); + bool allowenvovr = Scene.RegionInfo.EstateSettings.AllowEnviromentOverride; LLSDxmlEncode.AddArrayAndMap("ParcelEnvironmentBlock", sb); - LLSDxmlEncode.AddElem("ParcelEnvironmentVersion", -1, sb); - LLSDxmlEncode.AddElem("RegionAllowEnvironmentOverride", true, sb); + LLSDxmlEncode.AddElem("ParcelEnvironmentVersion", allowenvovr ? -1: -1, sb); + LLSDxmlEncode.AddElem("RegionAllowEnvironmentOverride", allowenvovr, sb); LLSDxmlEncode.AddEndMapAndArray(sb); bool accessovr = !Scene.RegionInfo.EstateSettings.TaxFree; diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index f69184ae90..9f9bce0835 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs @@ -183,6 +183,8 @@ namespace OpenSim.Region.CoreModules.World.Estate if (Scene.RegionInfo.EstateSettings.ResetHomeOnTeleport) flags |= RegionFlags.ResetHomeOnTeleport; + if (Scene.RegionInfo.EstateSettings.AllowEnviromentOverride) + flags |= RegionFlags.AllowEnviromentOverride; // TODO: SkipUpdateInterestList @@ -1401,7 +1403,7 @@ namespace OpenSim.Region.CoreModules.World.Estate } } - private void HandleRegionInfoRequest(IClientAPI remote_client) + public void HandleRegionInfoRequest(IClientAPI remote_client) { RegionInfoForEstateMenuArgs args = new RegionInfoForEstateMenuArgs(); args.billableFactor = Scene.RegionInfo.EstateSettings.BillableFactor; @@ -1555,6 +1557,11 @@ namespace OpenSim.Region.CoreModules.World.Estate else Scene.RegionInfo.EstateSettings.TaxFree = true; + if ((parms1 & 0x00000200) != 0) + Scene.RegionInfo.EstateSettings.AllowEnviromentOverride = true; + else + Scene.RegionInfo.EstateSettings.AllowEnviromentOverride = false; + if ((parms1 & 0x00100000) != 0) Scene.RegionInfo.EstateSettings.AllowDirectTeleport = true; else @@ -1600,7 +1607,8 @@ namespace OpenSim.Region.CoreModules.World.Estate bool externallyVisible, bool allowDirectTeleport, bool denyAnonymous, bool denyAgeUnverified, - bool alloVoiceChat, bool overridePublicAccess) + bool alloVoiceChat, bool overridePublicAccess, + bool allowEnviromentOverride) { if (sunHour == 0) { @@ -1624,6 +1632,7 @@ namespace OpenSim.Region.CoreModules.World.Estate // taxfree is now !AllowAccessOverride Scene.RegionInfo.EstateSettings.TaxFree = overridePublicAccess; Scene.RegionInfo.EstateSettings.DenyMinors = denyAgeUnverified; + Scene.RegionInfo.EstateSettings.AllowEnviromentOverride = allowEnviromentOverride; Scene.EstateDataService.StoreEstateSettings(Scene.RegionInfo.EstateSettings); TriggerEstateInfoChange(); @@ -1696,8 +1705,10 @@ namespace OpenSim.Region.CoreModules.World.Estate if (Scene.RegionInfo.EstateSettings.FixedSun) flags |= RegionFlags.SunFixed; if (!Scene.RegionInfo.EstateSettings.TaxFree) // this is now wrong means !ALLOW_ACCESS_OVERRIDE - flags |= RegionFlags.TaxFree; + flags |= RegionFlags.AllowParcelAccessOverride; + if(Scene.RegionInfo.EstateSettings.AllowEnviromentOverride) + flags |= RegionFlags.AllowEnviromentOverride; if (Scene.RegionInfo.EstateSettings.PublicAccess) //?? flags |= (RegionFlags.PublicAllowed | RegionFlags.ExternallyVisible); diff --git a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs index 51faa0e4d8..f76eac1afc 100755 --- a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs +++ b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs @@ -160,7 +160,7 @@ namespace OpenSim.Region.CoreModules // Generate initial wind values GenWind(); // hopefully this will not be the same for all regions on same instance - m_dataVersion = (int)m_scene.AllocateLocalId(); + m_dataVersion = m_scene.AllocateIntId(); // Mark Module Ready for duty m_ready = true; } diff --git a/OpenSim/Region/Framework/Interfaces/IEstateModule.cs b/OpenSim/Region/Framework/Interfaces/IEstateModule.cs index 0563c8f352..f2948c163b 100644 --- a/OpenSim/Region/Framework/Interfaces/IEstateModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IEstateModule.cs @@ -69,7 +69,8 @@ namespace OpenSim.Region.Framework.Interfaces /// bool IsTerrainXfer(ulong xferID); bool handleEstateChangeInfoCap(string estateName, UUID invoice, int sunHour, bool sunFixed, - bool externallyVisible, bool allowDirectTeleport, bool denyAnonymous, bool denyAgeUnverified, - bool alloVoiceChat, bool overridePublicAccess); + bool externallyVisible, bool allowDirectTeleport, bool denyAnonymous, bool denyAgeUnverified, + bool alloVoiceChat, bool overridePublicAccess, bool allowEnviromentOverride); + void HandleRegionInfoRequest(IClientAPI remote_client); } }