aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2012-10-13 01:41:18 +0100
committerUbitUmarov2012-10-13 01:41:18 +0100
commit666fb744a36ca5497dc8868298f47c23cd72b1a8 (patch)
treefc1ea699daf1e6c9f274436d84cf2d3b20cc1706
parent missing file (again) (diff)
downloadopensim-SC_OLD-666fb744a36ca5497dc8868298f47c23cd72b1a8.zip
opensim-SC_OLD-666fb744a36ca5497dc8868298f47c23cd72b1a8.tar.gz
opensim-SC_OLD-666fb744a36ca5497dc8868298f47c23cd72b1a8.tar.bz2
opensim-SC_OLD-666fb744a36ca5497dc8868298f47c23cd72b1a8.tar.xz
retouch mesh ids
-rw-r--r--OpenSim/Region/Physics/Manager/IMesher.cs2
-rw-r--r--OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs30
2 files changed, 21 insertions, 11 deletions
diff --git a/OpenSim/Region/Physics/Manager/IMesher.cs b/OpenSim/Region/Physics/Manager/IMesher.cs
index d0e3996..21a5fa0 100644
--- a/OpenSim/Region/Physics/Manager/IMesher.cs
+++ b/OpenSim/Region/Physics/Manager/IMesher.cs
@@ -73,7 +73,7 @@ namespace OpenSim.Region.Physics.Manager
73 73
74 public override string ToString() 74 public override string ToString()
75 { 75 {
76 return uuid.ToString() + "-" + hashC.ToString() ; 76 return uuid.ToString() + "-" + hashC.ToString("x") ;
77 } 77 }
78 } 78 }
79 79
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 }