aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs')
-rw-r--r--OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs30
1 files changed, 20 insertions, 10 deletions
diff --git a/OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs b/OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs
index 2fe34e3..35eabd4 100644
--- a/OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs
+++ b/OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs
@@ -956,7 +956,6 @@ namespace OpenSim.Region.Physics.Meshing
956 hash = mdjb2(hash, primShape.PathScaleY); 956 hash = mdjb2(hash, primShape.PathScaleY);
957 hash = mdjb2(hash, primShape.PathShearX); 957 hash = mdjb2(hash, primShape.PathShearX);
958 key.hashA = hash; 958 key.hashA = hash;
959 key.hashA |= 0xf000000000000000;
960 hash = key.hashB; 959 hash = key.hashB;
961 hash = mdjb2(hash, primShape.PathShearY); 960 hash = mdjb2(hash, primShape.PathShearY);
962 hash = mdjb2(hash, (byte)primShape.PathTwist); 961 hash = mdjb2(hash, (byte)primShape.PathTwist);
@@ -975,21 +974,32 @@ namespace OpenSim.Region.Physics.Meshing
975 974
976 hash = key.hashC; 975 hash = key.hashC;
977 976
978 someBytes = size.GetBytes();
979 for (int i = 0; i < someBytes.Length; i++)
980 hash = mdjb2(hash, someBytes[i]);
981
982 hash = mdjb2(hash, lod); 977 hash = mdjb2(hash, lod);
983 978
984 hash &= 0x3fffffffffffffff; 979 if (size == m_MeshUnitSize)
980 {
981 hash = hash << 8;
982 hash |= 8;
983 }
984 else
985 {
986 someBytes = size.GetBytes();
987 for (int i = 0; i < someBytes.Length; i++)
988 hash = mdjb2(hash, someBytes[i]);
989 hash = hash << 8;
990 }
985 991
986 if (convex) 992 if (convex)
987 hash |= 0x4000000000000000; 993 hash |= 4;
988 994
989 if (primShape.SculptEntry) 995 if (primShape.SculptEntry)
990 hash |= 0x8000000000000000; 996 {
997 hash |= 1;
998 if (primShape.SculptType == (byte)SculptType.Mesh)
999 hash |= 2;
1000 }
991 1001
992 key.hashB = hash; 1002 key.hashC = hash;
993 1003
994 return key; 1004 return key;
995 } 1005 }