From 918f56d68204c9ec9ddac603db3cf2e2d5f9ff8f Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 27 Mar 2020 17:26:49 +0000 Subject: [PATCH] fix lludp to read pseudocrc from SOP; move region cacheID to region settings --- OpenSim/Framework/RegionInfo.cs | 6 ------ OpenSim/Framework/RegionSettings.cs | 2 ++ .../Region/ClientStack/Linden/UDP/LLClientView.cs | 12 ++++++------ 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index 5a3b814371..d7f1d0ef1e 100755 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs @@ -180,7 +180,6 @@ namespace OpenSim.Framework private Dictionary m_extraSettings = new Dictionary(); - public UUID CacheID { get; set;} // Apparently, we're applying the same estatesettings regardless of whether it's local or remote. // MT: Yes. Estates can't span trust boundaries. Therefore, it can be @@ -197,8 +196,6 @@ namespace OpenSim.Framework public RegionInfo(string description, string filename, bool skipConsoleConfig, IConfigSource configSource, string configName) { // m_configSource = configSource; - CacheID = UUID.Random(); - if (filename.ToLower().EndsWith(".ini")) { if (!File.Exists(filename)) // New region config request @@ -257,7 +254,6 @@ namespace OpenSim.Framework ReadNiniConfig(source, name); m_serverURI = string.Empty; - CacheID = UUID.Random(); } public RegionInfo(uint legacyRegionLocX, uint legacyRegionLocY, IPEndPoint internalEndPoint, string externalUri) @@ -269,13 +265,11 @@ namespace OpenSim.Framework m_internalEndPoint = internalEndPoint; m_externalHostName = externalUri; m_serverURI = string.Empty; - CacheID = UUID.Random(); } public RegionInfo() { m_serverURI = string.Empty; - CacheID = UUID.Random(); } public EstateSettings EstateSettings diff --git a/OpenSim/Framework/RegionSettings.cs b/OpenSim/Framework/RegionSettings.cs index c2947a298b..c35a0d8ebd 100644 --- a/OpenSim/Framework/RegionSettings.cs +++ b/OpenSim/Framework/RegionSettings.cs @@ -128,6 +128,8 @@ namespace OpenSim.Framework set { m_RegionUUID = value; } } + public UUID CacheID { get; set; } = UUID.Random(); + private bool m_BlockTerraform = false; public bool BlockTerraform diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index b70e6b3038..eeee5316c3 100755 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -919,7 +919,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP //BillableFactor zc.AddFloat(es.BillableFactor); //CacheID - zc.AddUUID(regionInfo.CacheID); + zc.AddUUID(regionSettings.CacheID); //TerrainBase0 //TerrainBase1 //TerrainBase2 @@ -5467,7 +5467,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } Utils.UIntToBytes(sop.LocalId, data, pos); pos += 4; - Utils.UIntToBytes((uint)sop.ParentGroup.PseudoCRC, data, pos); pos += 4; //WRONG + Utils.UIntToBytes((uint)sop.PseudoCRC, data, pos); pos += 4; //WRONG Utils.UIntToBytes(primflags, data, pos); pos += 4; ++count; @@ -7116,7 +7116,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP zc.AddUInt(part.LocalId); zc.AddByte(state); // state zc.AddUUID(part.UUID); - zc.AddUInt((uint)part.ParentGroup.PseudoCRC); + zc.AddUInt((uint)part.PseudoCRC); zc.AddByte((byte)pcode); // material 1 // clickaction 1 @@ -7228,7 +7228,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP zc.AddUInt(part.LocalId); zc.AddByte(state); // state zc.AddUUID(part.UUID); - zc.AddUInt((uint)part.ParentGroup.PseudoCRC); + zc.AddUInt((uint)part.PseudoCRC); zc.AddByte((byte)pcode); zc.AddByte(part.Material); zc.AddByte(part.ClickAction); // clickaction @@ -7683,7 +7683,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP zc.AddByte((byte)pcode); zc.AddByte(state); - zc.AddUInt((uint)part.ParentGroup.PseudoCRC); + zc.AddUInt((uint)part.PseudoCRC); zc.AddZeros(2); // material and click action @@ -7846,7 +7846,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP zc.AddByte((byte)pcode); zc.AddByte(state); - zc.AddUInt((uint)part.ParentGroup.PseudoCRC); + zc.AddUInt((uint)part.PseudoCRC); zc.AddByte(part.Material); zc.AddByte(part.ClickAction);