diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/PrimitiveBaseShape.cs | 38 |
1 files changed, 33 insertions, 5 deletions
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs index 1b6a1d2..c6ccc9e 100644 --- a/OpenSim/Framework/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/PrimitiveBaseShape.cs | |||
@@ -720,7 +720,12 @@ namespace OpenSim.Framework | |||
720 | return _lightColorR; | 720 | return _lightColorR; |
721 | } | 721 | } |
722 | set { | 722 | set { |
723 | _lightColorR = value; | 723 | if (value < 0) |
724 | _lightColorR = 0; | ||
725 | else if (value > 1.0f) | ||
726 | _lightColorR = 1.0f; | ||
727 | else | ||
728 | _lightColorR = value; | ||
724 | } | 729 | } |
725 | } | 730 | } |
726 | 731 | ||
@@ -729,7 +734,12 @@ namespace OpenSim.Framework | |||
729 | return _lightColorG; | 734 | return _lightColorG; |
730 | } | 735 | } |
731 | set { | 736 | set { |
732 | _lightColorG = value; | 737 | if (value < 0) |
738 | _lightColorG = 0; | ||
739 | else if (value > 1.0f) | ||
740 | _lightColorG = 1.0f; | ||
741 | else | ||
742 | _lightColorG = value; | ||
733 | } | 743 | } |
734 | } | 744 | } |
735 | 745 | ||
@@ -738,7 +748,12 @@ namespace OpenSim.Framework | |||
738 | return _lightColorB; | 748 | return _lightColorB; |
739 | } | 749 | } |
740 | set { | 750 | set { |
741 | _lightColorB = value; | 751 | if (value < 0) |
752 | _lightColorB = 0; | ||
753 | else if (value > 1.0f) | ||
754 | _lightColorB = 1.0f; | ||
755 | else | ||
756 | _lightColorB = value; | ||
742 | } | 757 | } |
743 | } | 758 | } |
744 | 759 | ||
@@ -747,7 +762,12 @@ namespace OpenSim.Framework | |||
747 | return _lightColorA; | 762 | return _lightColorA; |
748 | } | 763 | } |
749 | set { | 764 | set { |
750 | _lightColorA = value; | 765 | if (value < 0) |
766 | _lightColorA = 0; | ||
767 | else if (value > 1.0f) | ||
768 | _lightColorA = 1.0f; | ||
769 | else | ||
770 | _lightColorA = value; | ||
751 | } | 771 | } |
752 | } | 772 | } |
753 | 773 | ||
@@ -861,6 +881,11 @@ namespace OpenSim.Framework | |||
861 | 881 | ||
862 | public ulong GetMeshKey(Vector3 size, float lod) | 882 | public ulong GetMeshKey(Vector3 size, float lod) |
863 | { | 883 | { |
884 | return GetMeshKey(size, lod, false); | ||
885 | } | ||
886 | |||
887 | public ulong GetMeshKey(Vector3 size, float lod, bool convex) | ||
888 | { | ||
864 | ulong hash = 5381; | 889 | ulong hash = 5381; |
865 | 890 | ||
866 | hash = djb2(hash, this.PathCurve); | 891 | hash = djb2(hash, this.PathCurve); |
@@ -906,6 +931,9 @@ namespace OpenSim.Framework | |||
906 | hash = djb2(hash, scaleBytes[i]); | 931 | hash = djb2(hash, scaleBytes[i]); |
907 | } | 932 | } |
908 | 933 | ||
934 | if(convex) | ||
935 | hash = djb2(hash, 0xa5); | ||
936 | |||
909 | return hash; | 937 | return hash; |
910 | } | 938 | } |
911 | 939 | ||
@@ -1410,7 +1438,7 @@ namespace OpenSim.Framework | |||
1410 | prim.Textures = this.Textures; | 1438 | prim.Textures = this.Textures; |
1411 | 1439 | ||
1412 | prim.Properties = new Primitive.ObjectProperties(); | 1440 | prim.Properties = new Primitive.ObjectProperties(); |
1413 | prim.Properties.Name = "Primitive"; | 1441 | prim.Properties.Name = "Object"; |
1414 | prim.Properties.Description = ""; | 1442 | prim.Properties.Description = ""; |
1415 | prim.Properties.CreatorID = UUID.Zero; | 1443 | prim.Properties.CreatorID = UUID.Zero; |
1416 | prim.Properties.GroupID = UUID.Zero; | 1444 | prim.Properties.GroupID = UUID.Zero; |