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 c1e1a4f..df928dc 100644
--- a/OpenSim/Framework/PrimitiveBaseShape.cs
+++ b/OpenSim/Framework/PrimitiveBaseShape.cs
@@ -717,7 +717,12 @@ namespace OpenSim.Framework
717 return _lightColorR; 717 return _lightColorR;
718 } 718 }
719 set { 719 set {
720 _lightColorR = value; 720 if (value < 0)
721 _lightColorR = 0;
722 else if (value > 1.0f)
723 _lightColorR = 1.0f;
724 else
725 _lightColorR = value;
721 } 726 }
722 } 727 }
723 728
@@ -726,7 +731,12 @@ namespace OpenSim.Framework
726 return _lightColorG; 731 return _lightColorG;
727 } 732 }
728 set { 733 set {
729 _lightColorG = value; 734 if (value < 0)
735 _lightColorG = 0;
736 else if (value > 1.0f)
737 _lightColorG = 1.0f;
738 else
739 _lightColorG = value;
730 } 740 }
731 } 741 }
732 742
@@ -735,7 +745,12 @@ namespace OpenSim.Framework
735 return _lightColorB; 745 return _lightColorB;
736 } 746 }
737 set { 747 set {
738 _lightColorB = value; 748 if (value < 0)
749 _lightColorB = 0;
750 else if (value > 1.0f)
751 _lightColorB = 1.0f;
752 else
753 _lightColorB = value;
739 } 754 }
740 } 755 }
741 756
@@ -744,7 +759,12 @@ namespace OpenSim.Framework
744 return _lightColorA; 759 return _lightColorA;
745 } 760 }
746 set { 761 set {
747 _lightColorA = value; 762 if (value < 0)
763 _lightColorA = 0;
764 else if (value > 1.0f)
765 _lightColorA = 1.0f;
766 else
767 _lightColorA = value;
748 } 768 }
749 } 769 }
750 770
@@ -858,6 +878,11 @@ namespace OpenSim.Framework
858 878
859 public ulong GetMeshKey(Vector3 size, float lod) 879 public ulong GetMeshKey(Vector3 size, float lod)
860 { 880 {
881 return GetMeshKey(size, lod, false);
882 }
883
884 public ulong GetMeshKey(Vector3 size, float lod, bool convex)
885 {
861 ulong hash = 5381; 886 ulong hash = 5381;
862 887
863 hash = djb2(hash, this.PathCurve); 888 hash = djb2(hash, this.PathCurve);
@@ -903,6 +928,9 @@ namespace OpenSim.Framework
903 hash = djb2(hash, scaleBytes[i]); 928 hash = djb2(hash, scaleBytes[i]);
904 } 929 }
905 930
931 if(convex)
932 hash = djb2(hash, 0xa5);
933
906 return hash; 934 return hash;
907 } 935 }
908 936
@@ -1406,7 +1434,7 @@ namespace OpenSim.Framework
1406 prim.Textures = this.Textures; 1434 prim.Textures = this.Textures;
1407 1435
1408 prim.Properties = new Primitive.ObjectProperties(); 1436 prim.Properties = new Primitive.ObjectProperties();
1409 prim.Properties.Name = "Primitive"; 1437 prim.Properties.Name = "Object";
1410 prim.Properties.Description = ""; 1438 prim.Properties.Description = "";
1411 prim.Properties.CreatorID = UUID.Zero; 1439 prim.Properties.CreatorID = UUID.Zero;
1412 prim.Properties.GroupID = UUID.Zero; 1440 prim.Properties.GroupID = UUID.Zero;