diff --git a/OpenSim/Region/Physics/Manager/IMesher.cs b/OpenSim/Region/Physics/Manager/IMesher.cs index d0e3996e5a..21a5fa0270 100644 --- a/OpenSim/Region/Physics/Manager/IMesher.cs +++ b/OpenSim/Region/Physics/Manager/IMesher.cs @@ -73,7 +73,7 @@ namespace OpenSim.Region.Physics.Manager public override string ToString() { - return uuid.ToString() + "-" + hashC.ToString() ; + return uuid.ToString() + "-" + hashC.ToString("x") ; } } diff --git a/OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs b/OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs index 2fe34e3474..35eabd4c60 100644 --- a/OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs @@ -956,7 +956,6 @@ namespace OpenSim.Region.Physics.Meshing hash = mdjb2(hash, primShape.PathScaleY); hash = mdjb2(hash, primShape.PathShearX); key.hashA = hash; - key.hashA |= 0xf000000000000000; hash = key.hashB; hash = mdjb2(hash, primShape.PathShearY); hash = mdjb2(hash, (byte)primShape.PathTwist); @@ -975,21 +974,32 @@ namespace OpenSim.Region.Physics.Meshing hash = key.hashC; - someBytes = size.GetBytes(); - for (int i = 0; i < someBytes.Length; i++) - hash = mdjb2(hash, someBytes[i]); - hash = mdjb2(hash, lod); - - hash &= 0x3fffffffffffffff; + + if (size == m_MeshUnitSize) + { + hash = hash << 8; + hash |= 8; + } + else + { + someBytes = size.GetBytes(); + for (int i = 0; i < someBytes.Length; i++) + hash = mdjb2(hash, someBytes[i]); + hash = hash << 8; + } if (convex) - hash |= 0x4000000000000000; + hash |= 4; if (primShape.SculptEntry) - hash |= 0x8000000000000000; + { + hash |= 1; + if (primShape.SculptType == (byte)SculptType.Mesh) + hash |= 2; + } - key.hashB = hash; + key.hashC = hash; return key; }