aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs59
1 files changed, 57 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 68b87fd..796b065 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -1049,8 +1049,13 @@ namespace OpenSim.Region.ScriptEngine.Common
1049 if (part == null) 1049 if (part == null)
1050 return; 1050 return;
1051 1051
1052 bool needs_fakedelete = false;
1052 if (flexi) 1053 if (flexi)
1053 { 1054 {
1055 if (!part.Shape.FlexiEntry)
1056 {
1057 needs_fakedelete = true;
1058 }
1054 part.Shape.FlexiEntry = true; // this setting flexi true isn't working, but the below parameters do 1059 part.Shape.FlexiEntry = true; // this setting flexi true isn't working, but the below parameters do
1055 // work once the prim is already flexi 1060 // work once the prim is already flexi
1056 part.Shape.FlexiSoftness = softness; 1061 part.Shape.FlexiSoftness = softness;
@@ -1065,11 +1070,50 @@ namespace OpenSim.Region.ScriptEngine.Common
1065 } 1070 }
1066 else 1071 else
1067 { 1072 {
1073 if (part.Shape.FlexiEntry)
1074 {
1075 needs_fakedelete = true;
1076 }
1068 part.Shape.FlexiEntry = false; 1077 part.Shape.FlexiEntry = false;
1069 } 1078 }
1070 part.SendFullUpdateToAllClients(); 1079
1080 needs_fakedelete = false;
1081 if (needs_fakedelete)
1082 {
1083 if (part.ParentGroup != null)
1084 {
1085 part.ParentGroup.FakeDeleteGroup();
1086 }
1087 }
1088
1089 part.ScheduleFullUpdate();
1090 }
1091
1092 private void SetPointLight(SceneObjectPart part, bool light, LSL_Types.Vector3 color, float intensity, float radius, float falloff)
1093 {
1094 if (part == null)
1095 return;
1096
1097 if (light)
1098 {
1099 part.Shape.LightEntry = true;
1100 part.Shape.LightColorR = (float)color.x;
1101 part.Shape.LightColorG = (float)color.y;
1102 part.Shape.LightColorB = (float)color.z;
1103 part.Shape.LightIntensity = intensity;
1104 part.Shape.LightRadius = radius;
1105 part.Shape.LightFalloff = falloff;
1106 }
1107 else
1108 {
1109 part.Shape.LightEntry = false;
1110 }
1111
1112 part.ScheduleFullUpdate();
1071 } 1113 }
1072 1114
1115
1116
1073 public LSL_Types.Vector3 llGetColor(int face) 1117 public LSL_Types.Vector3 llGetColor(int face)
1074 { 1118 {
1075 m_host.AddScriptLPS(1); 1119 m_host.AddScriptLPS(1);
@@ -4701,7 +4745,18 @@ namespace OpenSim.Region.ScriptEngine.Common
4701 SetFlexi(part, (flexi == 1), softness, gravity, friction, wind, tension, force); 4745 SetFlexi(part, (flexi == 1), softness, gravity, friction, wind, tension, force);
4702 4746
4703 break; 4747 break;
4704 4748 case 23: // PRIM_POINT_LIGHT
4749 if (remain < 5)
4750 return;
4751 int light = Convert.ToInt32(rules.Data[idx++]);
4752 LSL_Types.Vector3 lightcolor =new LSL_Types.Vector3(rules.Data[idx++].ToString());
4753 float intensity = (float)Convert.ToDouble(rules.Data[idx++]);
4754 float radius = (float)Convert.ToDouble(rules.Data[idx++]);
4755 float falloff = (float)Convert.ToDouble(rules.Data[idx++]);
4756
4757 SetPointLight(part, (light == 1), lightcolor, intensity, radius, falloff);
4758
4759 break;
4705 } 4760 }
4706 } 4761 }
4707 } 4762 }