diff options
Diffstat (limited to 'OpenSim/Framework/PrimitiveBaseShape.cs')
-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 c8a5376..6a12a45 100644 --- a/OpenSim/Framework/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/PrimitiveBaseShape.cs | |||
@@ -728,7 +728,12 @@ namespace OpenSim.Framework | |||
728 | return _lightColorR; | 728 | return _lightColorR; |
729 | } | 729 | } |
730 | set { | 730 | set { |
731 | _lightColorR = value; | 731 | if (value < 0) |
732 | _lightColorR = 0; | ||
733 | else if (value > 1.0f) | ||
734 | _lightColorR = 1.0f; | ||
735 | else | ||
736 | _lightColorR = value; | ||
732 | } | 737 | } |
733 | } | 738 | } |
734 | 739 | ||
@@ -737,7 +742,12 @@ namespace OpenSim.Framework | |||
737 | return _lightColorG; | 742 | return _lightColorG; |
738 | } | 743 | } |
739 | set { | 744 | set { |
740 | _lightColorG = value; | 745 | if (value < 0) |
746 | _lightColorG = 0; | ||
747 | else if (value > 1.0f) | ||
748 | _lightColorG = 1.0f; | ||
749 | else | ||
750 | _lightColorG = value; | ||
741 | } | 751 | } |
742 | } | 752 | } |
743 | 753 | ||
@@ -746,7 +756,12 @@ namespace OpenSim.Framework | |||
746 | return _lightColorB; | 756 | return _lightColorB; |
747 | } | 757 | } |
748 | set { | 758 | set { |
749 | _lightColorB = value; | 759 | if (value < 0) |
760 | _lightColorB = 0; | ||
761 | else if (value > 1.0f) | ||
762 | _lightColorB = 1.0f; | ||
763 | else | ||
764 | _lightColorB = value; | ||
750 | } | 765 | } |
751 | } | 766 | } |
752 | 767 | ||
@@ -755,7 +770,12 @@ namespace OpenSim.Framework | |||
755 | return _lightColorA; | 770 | return _lightColorA; |
756 | } | 771 | } |
757 | set { | 772 | set { |
758 | _lightColorA = value; | 773 | if (value < 0) |
774 | _lightColorA = 0; | ||
775 | else if (value > 1.0f) | ||
776 | _lightColorA = 1.0f; | ||
777 | else | ||
778 | _lightColorA = value; | ||
759 | } | 779 | } |
760 | } | 780 | } |
761 | 781 | ||
@@ -869,6 +889,11 @@ namespace OpenSim.Framework | |||
869 | 889 | ||
870 | public ulong GetMeshKey(Vector3 size, float lod) | 890 | public ulong GetMeshKey(Vector3 size, float lod) |
871 | { | 891 | { |
892 | return GetMeshKey(size, lod, false); | ||
893 | } | ||
894 | |||
895 | public ulong GetMeshKey(Vector3 size, float lod, bool convex) | ||
896 | { | ||
872 | ulong hash = 5381; | 897 | ulong hash = 5381; |
873 | 898 | ||
874 | hash = djb2(hash, this.PathCurve); | 899 | hash = djb2(hash, this.PathCurve); |
@@ -914,6 +939,9 @@ namespace OpenSim.Framework | |||
914 | hash = djb2(hash, scaleBytes[i]); | 939 | hash = djb2(hash, scaleBytes[i]); |
915 | } | 940 | } |
916 | 941 | ||
942 | if(convex) | ||
943 | hash = djb2(hash, 0xa5); | ||
944 | |||
917 | return hash; | 945 | return hash; |
918 | } | 946 | } |
919 | 947 | ||
@@ -1417,7 +1445,7 @@ namespace OpenSim.Framework | |||
1417 | prim.Textures = this.Textures; | 1445 | prim.Textures = this.Textures; |
1418 | 1446 | ||
1419 | prim.Properties = new Primitive.ObjectProperties(); | 1447 | prim.Properties = new Primitive.ObjectProperties(); |
1420 | prim.Properties.Name = "Primitive"; | 1448 | prim.Properties.Name = "Object"; |
1421 | prim.Properties.Description = ""; | 1449 | prim.Properties.Description = ""; |
1422 | prim.Properties.CreatorID = UUID.Zero; | 1450 | prim.Properties.CreatorID = UUID.Zero; |
1423 | prim.Properties.GroupID = UUID.Zero; | 1451 | prim.Properties.GroupID = UUID.Zero; |