aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Framework/PrimitiveBaseShape.cs28
1 files changed, 24 insertions, 4 deletions
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs
index 20b9cf1..9a38f23 100644
--- a/OpenSim/Framework/PrimitiveBaseShape.cs
+++ b/OpenSim/Framework/PrimitiveBaseShape.cs
@@ -708,7 +708,12 @@ namespace OpenSim.Framework
708 return _lightColorR; 708 return _lightColorR;
709 } 709 }
710 set { 710 set {
711 _lightColorR = value; 711 if (value < 0)
712 _lightColorR = 0;
713 else if (value > 1.0f)
714 _lightColorR = 1.0f;
715 else
716 _lightColorR = value;
712 } 717 }
713 } 718 }
714 719
@@ -717,7 +722,12 @@ namespace OpenSim.Framework
717 return _lightColorG; 722 return _lightColorG;
718 } 723 }
719 set { 724 set {
720 _lightColorG = value; 725 if (value < 0)
726 _lightColorG = 0;
727 else if (value > 1.0f)
728 _lightColorG = 1.0f;
729 else
730 _lightColorG = value;
721 } 731 }
722 } 732 }
723 733
@@ -726,7 +736,12 @@ namespace OpenSim.Framework
726 return _lightColorB; 736 return _lightColorB;
727 } 737 }
728 set { 738 set {
729 _lightColorB = value; 739 if (value < 0)
740 _lightColorB = 0;
741 else if (value > 1.0f)
742 _lightColorB = 1.0f;
743 else
744 _lightColorB = value;
730 } 745 }
731 } 746 }
732 747
@@ -735,7 +750,12 @@ namespace OpenSim.Framework
735 return _lightColorA; 750 return _lightColorA;
736 } 751 }
737 set { 752 set {
738 _lightColorA = value; 753 if (value < 0)
754 _lightColorA = 0;
755 else if (value > 1.0f)
756 _lightColorA = 1.0f;
757 else
758 _lightColorA = value;
739 } 759 }
740 } 760 }
741 761