fix lludp to read pseudocrc from SOP; move region cacheID to region settings

master
UbitUmarov 2020-03-27 17:26:49 +00:00
parent 8e6fc69a11
commit 918f56d682
3 changed files with 8 additions and 12 deletions

View File

@ -180,7 +180,6 @@ namespace OpenSim.Framework
private Dictionary<String, String> m_extraSettings = new Dictionary<string, string>(); private Dictionary<String, String> m_extraSettings = new Dictionary<string, string>();
public UUID CacheID { get; set;}
// Apparently, we're applying the same estatesettings regardless of whether it's local or remote. // 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 // 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) public RegionInfo(string description, string filename, bool skipConsoleConfig, IConfigSource configSource, string configName)
{ {
// m_configSource = configSource; // m_configSource = configSource;
CacheID = UUID.Random();
if (filename.ToLower().EndsWith(".ini")) if (filename.ToLower().EndsWith(".ini"))
{ {
if (!File.Exists(filename)) // New region config request if (!File.Exists(filename)) // New region config request
@ -257,7 +254,6 @@ namespace OpenSim.Framework
ReadNiniConfig(source, name); ReadNiniConfig(source, name);
m_serverURI = string.Empty; m_serverURI = string.Empty;
CacheID = UUID.Random();
} }
public RegionInfo(uint legacyRegionLocX, uint legacyRegionLocY, IPEndPoint internalEndPoint, string externalUri) public RegionInfo(uint legacyRegionLocX, uint legacyRegionLocY, IPEndPoint internalEndPoint, string externalUri)
@ -269,13 +265,11 @@ namespace OpenSim.Framework
m_internalEndPoint = internalEndPoint; m_internalEndPoint = internalEndPoint;
m_externalHostName = externalUri; m_externalHostName = externalUri;
m_serverURI = string.Empty; m_serverURI = string.Empty;
CacheID = UUID.Random();
} }
public RegionInfo() public RegionInfo()
{ {
m_serverURI = string.Empty; m_serverURI = string.Empty;
CacheID = UUID.Random();
} }
public EstateSettings EstateSettings public EstateSettings EstateSettings

View File

@ -128,6 +128,8 @@ namespace OpenSim.Framework
set { m_RegionUUID = value; } set { m_RegionUUID = value; }
} }
public UUID CacheID { get; set; } = UUID.Random();
private bool m_BlockTerraform = false; private bool m_BlockTerraform = false;
public bool BlockTerraform public bool BlockTerraform

View File

@ -919,7 +919,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
//BillableFactor //BillableFactor
zc.AddFloat(es.BillableFactor); zc.AddFloat(es.BillableFactor);
//CacheID //CacheID
zc.AddUUID(regionInfo.CacheID); zc.AddUUID(regionSettings.CacheID);
//TerrainBase0 //TerrainBase0
//TerrainBase1 //TerrainBase1
//TerrainBase2 //TerrainBase2
@ -5467,7 +5467,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
Utils.UIntToBytes(sop.LocalId, data, pos); pos += 4; 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; Utils.UIntToBytes(primflags, data, pos); pos += 4;
++count; ++count;
@ -7116,7 +7116,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
zc.AddUInt(part.LocalId); zc.AddUInt(part.LocalId);
zc.AddByte(state); // state zc.AddByte(state); // state
zc.AddUUID(part.UUID); zc.AddUUID(part.UUID);
zc.AddUInt((uint)part.ParentGroup.PseudoCRC); zc.AddUInt((uint)part.PseudoCRC);
zc.AddByte((byte)pcode); zc.AddByte((byte)pcode);
// material 1 // material 1
// clickaction 1 // clickaction 1
@ -7228,7 +7228,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
zc.AddUInt(part.LocalId); zc.AddUInt(part.LocalId);
zc.AddByte(state); // state zc.AddByte(state); // state
zc.AddUUID(part.UUID); zc.AddUUID(part.UUID);
zc.AddUInt((uint)part.ParentGroup.PseudoCRC); zc.AddUInt((uint)part.PseudoCRC);
zc.AddByte((byte)pcode); zc.AddByte((byte)pcode);
zc.AddByte(part.Material); zc.AddByte(part.Material);
zc.AddByte(part.ClickAction); // clickaction zc.AddByte(part.ClickAction); // clickaction
@ -7683,7 +7683,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
zc.AddByte((byte)pcode); zc.AddByte((byte)pcode);
zc.AddByte(state); zc.AddByte(state);
zc.AddUInt((uint)part.ParentGroup.PseudoCRC); zc.AddUInt((uint)part.PseudoCRC);
zc.AddZeros(2); // material and click action zc.AddZeros(2); // material and click action
@ -7846,7 +7846,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
zc.AddByte((byte)pcode); zc.AddByte((byte)pcode);
zc.AddByte(state); zc.AddByte(state);
zc.AddUInt((uint)part.ParentGroup.PseudoCRC); zc.AddUInt((uint)part.PseudoCRC);
zc.AddByte(part.Material); zc.AddByte(part.Material);
zc.AddByte(part.ClickAction); zc.AddByte(part.ClickAction);