aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorCasperW2010-02-15 06:10:04 +0100
committerCasperW2010-02-15 06:10:04 +0100
commit94c417c90c9e4d91ea0c09fc5a3ac2541e09655d (patch)
tree7214be8b6aadbf2f4051c11f4140e606974112ea /OpenSim/Region
parentMerge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into ... (diff)
downloadopensim-SC-94c417c90c9e4d91ea0c09fc5a3ac2541e09655d.zip
opensim-SC-94c417c90c9e4d91ea0c09fc5a3ac2541e09655d.tar.gz
opensim-SC-94c417c90c9e4d91ea0c09fc5a3ac2541e09655d.tar.bz2
opensim-SC-94c417c90c9e4d91ea0c09fc5a3ac2541e09655d.tar.xz
Implement missing llGetPrimitiveParams parameters
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs170
1 files changed, 138 insertions, 32 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index e4ccce8..9db8ca0 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -7674,25 +7674,96 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7674 } 7674 }
7675 break; 7675 break;
7676 7676
7677 case (int)ScriptBaseClass.PRIM_BUMP_SHINY: 7677 case (int)ScriptBaseClass.PRIM_BUMP_SHINY:
7678 // TODO-------------- 7678 if (remain < 1)
7679 if (remain < 1) 7679 return res;
7680 return res; 7680 face = (int)rules.GetLSLIntegerItem(idx++);
7681 7681
7682 face=(int)rules.GetLSLIntegerItem(idx++); 7682 tex = part.Shape.Textures;
7683 7683 int shiny;
7684 res.Add(new LSL_Integer(0)); 7684 if (face == ScriptBaseClass.ALL_SIDES)
7685 res.Add(new LSL_Integer(0)); 7685 {
7686 for (face = 0; face < GetNumberOfSides(part); face++)
7687 {
7688 Shininess shinyness = tex.GetFace((uint)face).Shiny;
7689 if (shinyness == Shininess.High)
7690 {
7691 shiny = ScriptBaseClass.PRIM_SHINY_HIGH;
7692 }
7693 else if (shinyness == Shininess.Medium)
7694 {
7695 shiny = ScriptBaseClass.PRIM_SHINY_MEDIUM;
7696 }
7697 else if (shinyness == Shininess.Low)
7698 {
7699 shiny = ScriptBaseClass.PRIM_SHINY_LOW;
7700 }
7701 else
7702 {
7703 shiny = ScriptBaseClass.PRIM_SHINY_NONE;
7704 }
7705 res.Add(new LSL_Integer(shiny));
7706 res.Add(new LSL_Integer((int)tex.GetFace((uint)face).Bump));
7707 }
7708 }
7709 else
7710 {
7711 Shininess shinyness = tex.GetFace((uint)face).Shiny;
7712 if (shinyness == Shininess.High)
7713 {
7714 shiny = ScriptBaseClass.PRIM_SHINY_HIGH;
7715 }
7716 else if (shinyness == Shininess.Medium)
7717 {
7718 shiny = ScriptBaseClass.PRIM_SHINY_MEDIUM;
7719 }
7720 else if (shinyness == Shininess.Low)
7721 {
7722 shiny = ScriptBaseClass.PRIM_SHINY_LOW;
7723 }
7724 else
7725 {
7726 shiny = ScriptBaseClass.PRIM_SHINY_NONE;
7727 }
7728 res.Add(new LSL_Integer(shiny));
7729 res.Add(new LSL_Integer((int)tex.GetFace((uint)face).Bump));
7730 }
7686 break; 7731 break;
7687 7732
7688 case (int)ScriptBaseClass.PRIM_FULLBRIGHT: 7733 case (int)ScriptBaseClass.PRIM_FULLBRIGHT:
7689 // TODO-------------- 7734 if (remain < 1)
7690 if (remain < 1) 7735 return res;
7691 return res; 7736 face = (int)rules.GetLSLIntegerItem(idx++);
7692 7737
7693 face=(int)rules.GetLSLIntegerItem(idx++); 7738 tex = part.Shape.Textures;
7694 7739 int fullbright;
7695 res.Add(new LSL_Integer(0)); 7740 if (face == ScriptBaseClass.ALL_SIDES)
7741 {
7742 for (face = 0; face < GetNumberOfSides(part); face++)
7743 {
7744 if (tex.GetFace((uint)face).Fullbright == true)
7745 {
7746 fullbright = ScriptBaseClass.TRUE;
7747 }
7748 else
7749 {
7750 fullbright = ScriptBaseClass.FALSE;
7751 }
7752 res.Add(new LSL_Integer(fullbright));
7753 }
7754 }
7755 else
7756 {
7757 if (tex.GetFace((uint)face).Fullbright == true)
7758 {
7759 fullbright = ScriptBaseClass.TRUE;
7760 }
7761 else
7762 {
7763 fullbright = ScriptBaseClass.FALSE;
7764 }
7765 res.Add(new LSL_Integer(fullbright));
7766 }
7696 break; 7767 break;
7697 7768
7698 case (int)ScriptBaseClass.PRIM_FLEXIBLE: 7769 case (int)ScriptBaseClass.PRIM_FLEXIBLE:
@@ -7713,14 +7784,37 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7713 break; 7784 break;
7714 7785
7715 case (int)ScriptBaseClass.PRIM_TEXGEN: 7786 case (int)ScriptBaseClass.PRIM_TEXGEN:
7716 // TODO-------------- 7787 // (PRIM_TEXGEN_DEFAULT, PRIM_TEXGEN_PLANAR)
7717 // (PRIM_TEXGEN_DEFAULT, PRIM_TEXGEN_PLANAR) 7788 if (remain < 1)
7718 if (remain < 1) 7789 return res;
7719 return res; 7790 face = (int)rules.GetLSLIntegerItem(idx++);
7720 7791
7721 face=(int)rules.GetLSLIntegerItem(idx++); 7792 tex = part.Shape.Textures;
7722 7793 if (face == ScriptBaseClass.ALL_SIDES)
7723 res.Add(new LSL_Integer(0)); 7794 {
7795 for (face = 0; face < GetNumberOfSides(part); face++)
7796 {
7797 if (tex.GetFace((uint)face).TexMapType == MappingType.Planar)
7798 {
7799 res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_PLANAR));
7800 }
7801 else
7802 {
7803 res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_DEFAULT));
7804 }
7805 }
7806 }
7807 else
7808 {
7809 if (tex.GetFace((uint)face).TexMapType == MappingType.Planar)
7810 {
7811 res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_PLANAR));
7812 }
7813 else
7814 {
7815 res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_DEFAULT));
7816 }
7817 }
7724 break; 7818 break;
7725 7819
7726 case (int)ScriptBaseClass.PRIM_POINT_LIGHT: 7820 case (int)ScriptBaseClass.PRIM_POINT_LIGHT:
@@ -7738,14 +7832,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7738 res.Add(new LSL_Float(shape.LightFalloff)); // falloff 7832 res.Add(new LSL_Float(shape.LightFalloff)); // falloff
7739 break; 7833 break;
7740 7834
7741 case (int)ScriptBaseClass.PRIM_GLOW: 7835 case (int)ScriptBaseClass.PRIM_GLOW:
7742 // TODO-------------- 7836 if (remain < 1)
7743 if (remain < 1)
7744 return res; 7837 return res;
7745 7838 face = (int)rules.GetLSLIntegerItem(idx++);
7746 face=(int)rules.GetLSLIntegerItem(idx++); 7839
7747 7840 tex = part.Shape.Textures;
7748 res.Add(new LSL_Float(0)); 7841 float primglow;
7842 if (face == ScriptBaseClass.ALL_SIDES)
7843 {
7844 for (face = 0; face < GetNumberOfSides(part); face++)
7845 {
7846 primglow = tex.GetFace((uint)face).Glow;
7847 res.Add(new LSL_Float(primglow));
7848 }
7849 }
7850 else
7851 {
7852 primglow = tex.GetFace((uint)face).Glow;
7853 res.Add(new LSL_Float(primglow));
7854 }
7749 break; 7855 break;
7750 } 7856 }
7751 } 7857 }