aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation
diff options
context:
space:
mode:
authorSignpostMarv2012-08-17 16:53:36 +0100
committerJustin Clark-Casey (justincc)2012-08-17 18:40:49 +0100
commite9ea911563362c4766d34cd948a2915beac06124 (patch)
tree87542410a40fce3e909339112404b6bd76696e9b /OpenSim/Region/ScriptEngine/Shared/Api/Implementation
parentenables configurable minimum sizes for physical & non-physical prims (diff)
downloadopensim-SC-e9ea911563362c4766d34cd948a2915beac06124.zip
opensim-SC-e9ea911563362c4766d34cd948a2915beac06124.tar.gz
opensim-SC-e9ea911563362c4766d34cd948a2915beac06124.tar.bz2
opensim-SC-e9ea911563362c4766d34cd948a2915beac06124.tar.xz
adding a clip method to handle Vector3 objects to enable a minor amount of refactoring
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs11
1 files changed, 5 insertions, 6 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index a7852ec..b7b5e8e 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4019,9 +4019,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4019 public void llSetText(string text, LSL_Vector color, double alpha) 4019 public void llSetText(string text, LSL_Vector color, double alpha)
4020 { 4020 {
4021 m_host.AddScriptLPS(1); 4021 m_host.AddScriptLPS(1);
4022 Vector3 av3 = new Vector3(Util.Clip((float)color.x, 0.0f, 1.0f), 4022 Vector3 av3 = Util.Clip(new Vector3((float)color.x, (float)color.y,
4023 Util.Clip((float)color.y, 0.0f, 1.0f), 4023 (float)color.z), 0.0f, 1.0f);
4024 Util.Clip((float)color.z, 0.0f, 1.0f));
4025 m_host.SetText(text.Length > 254 ? text.Remove(254) : text, av3, Util.Clip((float)alpha, 0.0f, 1.0f)); 4024 m_host.SetText(text.Length > 254 ? text.Remove(254) : text, av3, Util.Clip((float)alpha, 0.0f, 1.0f));
4026 //m_host.ParentGroup.HasGroupChanged = true; 4025 //m_host.ParentGroup.HasGroupChanged = true;
4027 //m_host.ParentGroup.ScheduleGroupForFullUpdate(); 4026 //m_host.ParentGroup.ScheduleGroupForFullUpdate();
@@ -7635,9 +7634,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7635 string primText = rules.GetLSLStringItem(idx++); 7634 string primText = rules.GetLSLStringItem(idx++);
7636 LSL_Vector primTextColor = rules.GetVector3Item(idx++); 7635 LSL_Vector primTextColor = rules.GetVector3Item(idx++);
7637 LSL_Float primTextAlpha = rules.GetLSLFloatItem(idx++); 7636 LSL_Float primTextAlpha = rules.GetLSLFloatItem(idx++);
7638 Vector3 av3 = new Vector3(Util.Clip((float)primTextColor.x, 0.0f, 1.0f), 7637 Vector3 av3 = Util.Clip(new Vector3((float)primTextColor.x,
7639 Util.Clip((float)primTextColor.y, 0.0f, 1.0f), 7638 (float)primTextColor.y,
7640 Util.Clip((float)primTextColor.z, 0.0f, 1.0f)); 7639 (float)primTextColor.z), 0.0f, 1.0f);
7641 part.SetText(primText, av3, Util.Clip((float)primTextAlpha, 0.0f, 1.0f)); 7640 part.SetText(primText, av3, Util.Clip((float)primTextAlpha, 0.0f, 1.0f));
7642 7641
7643 break; 7642 break;