aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/PrimitiveBaseShape.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/PrimitiveBaseShape.cs38
1 files changed, 33 insertions, 5 deletions
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs
index 4c36819..948c259 100644
--- a/OpenSim/Framework/PrimitiveBaseShape.cs
+++ b/OpenSim/Framework/PrimitiveBaseShape.cs
@@ -715,7 +715,12 @@ namespace OpenSim.Framework
715 return _lightColorR; 715 return _lightColorR;
716 } 716 }
717 set { 717 set {
718 _lightColorR = value; 718 if (value < 0)
719 _lightColorR = 0;
720 else if (value > 1.0f)
721 _lightColorR = 1.0f;
722 else
723 _lightColorR = value;
719 } 724 }
720 } 725 }
721 726
@@ -724,7 +729,12 @@ namespace OpenSim.Framework
724 return _lightColorG; 729 return _lightColorG;
725 } 730 }
726 set { 731 set {
727 _lightColorG = value; 732 if (value < 0)
733 _lightColorG = 0;
734 else if (value > 1.0f)
735 _lightColorG = 1.0f;
736 else
737 _lightColorG = value;
728 } 738 }
729 } 739 }
730 740
@@ -733,7 +743,12 @@ namespace OpenSim.Framework
733 return _lightColorB; 743 return _lightColorB;
734 } 744 }
735 set { 745 set {
736 _lightColorB = value; 746 if (value < 0)
747 _lightColorB = 0;
748 else if (value > 1.0f)
749 _lightColorB = 1.0f;
750 else
751 _lightColorB = value;
737 } 752 }
738 } 753 }
739 754
@@ -742,7 +757,12 @@ namespace OpenSim.Framework
742 return _lightColorA; 757 return _lightColorA;
743 } 758 }
744 set { 759 set {
745 _lightColorA = value; 760 if (value < 0)
761 _lightColorA = 0;
762 else if (value > 1.0f)
763 _lightColorA = 1.0f;
764 else
765 _lightColorA = value;
746 } 766 }
747 } 767 }
748 768
@@ -856,6 +876,11 @@ namespace OpenSim.Framework
856 876
857 public ulong GetMeshKey(Vector3 size, float lod) 877 public ulong GetMeshKey(Vector3 size, float lod)
858 { 878 {
879 return GetMeshKey(size, lod, false);
880 }
881
882 public ulong GetMeshKey(Vector3 size, float lod, bool convex)
883 {
859 ulong hash = 5381; 884 ulong hash = 5381;
860 885
861 hash = djb2(hash, this.PathCurve); 886 hash = djb2(hash, this.PathCurve);
@@ -901,6 +926,9 @@ namespace OpenSim.Framework
901 hash = djb2(hash, scaleBytes[i]); 926 hash = djb2(hash, scaleBytes[i]);
902 } 927 }
903 928
929 if(convex)
930 hash = djb2(hash, 0xa5);
931
904 return hash; 932 return hash;
905 } 933 }
906 934
@@ -1405,7 +1433,7 @@ namespace OpenSim.Framework
1405 prim.Textures = this.Textures; 1433 prim.Textures = this.Textures;
1406 1434
1407 prim.Properties = new Primitive.ObjectProperties(); 1435 prim.Properties = new Primitive.ObjectProperties();
1408 prim.Properties.Name = "Primitive"; 1436 prim.Properties.Name = "Object";
1409 prim.Properties.Description = ""; 1437 prim.Properties.Description = "";
1410 prim.Properties.CreatorID = UUID.Zero; 1438 prim.Properties.CreatorID = UUID.Zero;
1411 prim.Properties.GroupID = UUID.Zero; 1439 prim.Properties.GroupID = UUID.Zero;