diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 48 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs | 3 |
2 files changed, 46 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 8bf9482..1a13dea 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -6892,7 +6892,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6892 | 6892 | ||
6893 | public void llSetLinkPrimitiveParamsFast(int linknumber, LSL_List rules) | 6893 | public void llSetLinkPrimitiveParamsFast(int linknumber, LSL_List rules) |
6894 | { | 6894 | { |
6895 | llSetLinkPrimitiveParams(linknumber, rules); | 6895 | m_host.AddScriptLPS(1); |
6896 | |||
6897 | List<SceneObjectPart> parts = GetLinkParts(linknumber); | ||
6898 | |||
6899 | foreach (SceneObjectPart part in parts) | ||
6900 | SetPrimParams(part, rules); | ||
6896 | } | 6901 | } |
6897 | 6902 | ||
6898 | protected void SetPrimParams(SceneObjectPart part, LSL_List rules) | 6903 | protected void SetPrimParams(SceneObjectPart part, LSL_List rules) |
@@ -7263,6 +7268,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7263 | part.SetText(primText, av3, Util.Clip((float)primTextAlpha, 0.0f, 1.0f)); | 7268 | part.SetText(primText, av3, Util.Clip((float)primTextAlpha, 0.0f, 1.0f)); |
7264 | 7269 | ||
7265 | break; | 7270 | break; |
7271 | case (int)ScriptBaseClass.PRIM_NAME: | ||
7272 | if (remain < 1) | ||
7273 | return; | ||
7274 | string primName = rules.GetLSLStringItem(idx++); | ||
7275 | part.Name = primName; | ||
7276 | break; | ||
7277 | case (int)ScriptBaseClass.PRIM_DESC: | ||
7278 | if (remain < 1) | ||
7279 | return; | ||
7280 | string primDesc = rules.GetLSLStringItem(idx++); | ||
7281 | part.Description = primDesc; | ||
7282 | break; | ||
7283 | case (int)ScriptBaseClass.PRIM_ROT_LOCAL: | ||
7284 | if (remain < 1) | ||
7285 | return; | ||
7286 | LSL_Rotation lr = rules.GetQuaternionItem(idx++); | ||
7287 | SetRot(part, Rot2Quaternion(lr)); | ||
7288 | break; | ||
7266 | } | 7289 | } |
7267 | } | 7290 | } |
7268 | } | 7291 | } |
@@ -7808,6 +7831,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7808 | textColor.B)); | 7831 | textColor.B)); |
7809 | res.Add(new LSL_Float(textColor.A)); | 7832 | res.Add(new LSL_Float(textColor.A)); |
7810 | break; | 7833 | break; |
7834 | case (int)ScriptBaseClass.PRIM_NAME: | ||
7835 | res.Add(part.Name); | ||
7836 | break; | ||
7837 | case (int)ScriptBaseClass.PRIM_DESC: | ||
7838 | res.Add(part.Description); | ||
7839 | break; | ||
7840 | case (int)ScriptBaseClass.PRIM_ROT_LOCAL: | ||
7841 | res.Add(new LSL_Rotation(part.RotationOffset.X, part.RotationOffset.Y, part.RotationOffset.Z, part.RotationOffset.W)); | ||
7842 | break; | ||
7811 | } | 7843 | } |
7812 | } | 7844 | } |
7813 | return res; | 7845 | return res; |
@@ -8404,6 +8436,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8404 | 8436 | ||
8405 | for (j = 0; j < seplen; j++) | 8437 | for (j = 0; j < seplen; j++) |
8406 | { | 8438 | { |
8439 | if (separray[j].ToString() == String.Empty) | ||
8440 | active[j] = false; | ||
8441 | |||
8407 | if (active[j]) | 8442 | if (active[j]) |
8408 | { | 8443 | { |
8409 | // scan all of the markers | 8444 | // scan all of the markers |
@@ -8432,6 +8467,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8432 | { | 8467 | { |
8433 | for (j = seplen; (j < mlen) && (offset[best] > beginning); j++) | 8468 | for (j = seplen; (j < mlen) && (offset[best] > beginning); j++) |
8434 | { | 8469 | { |
8470 | if (spcarray[j-seplen].ToString() == String.Empty) | ||
8471 | active[j] = false; | ||
8472 | |||
8435 | if (active[j]) | 8473 | if (active[j]) |
8436 | { | 8474 | { |
8437 | // scan all of the markers | 8475 | // scan all of the markers |
@@ -9090,10 +9128,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9090 | // do that one last, it will cause a ParcelPropertiesUpdate | 9128 | // do that one last, it will cause a ParcelPropertiesUpdate |
9091 | landObject.SetMediaUrl(url); | 9129 | landObject.SetMediaUrl(url); |
9092 | 9130 | ||
9093 | // now send to all (non-child) agents | 9131 | // now send to all (non-child) agents in the parcel |
9094 | World.ForEachScenePresence(delegate(ScenePresence sp) | 9132 | World.ForEachScenePresence(delegate(ScenePresence sp) |
9095 | { | 9133 | { |
9096 | if (!sp.IsChildAgent) | 9134 | if (!sp.IsChildAgent && (sp.currentParcelUUID == landData.GlobalID)) |
9097 | { | 9135 | { |
9098 | sp.ControllingClient.SendParcelMediaUpdate(landData.MediaURL, | 9136 | sp.ControllingClient.SendParcelMediaUpdate(landData.MediaURL, |
9099 | landData.MediaID, | 9137 | landData.MediaID, |
@@ -9123,10 +9161,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9123 | // the commandList contained a start/stop/... command, too | 9161 | // the commandList contained a start/stop/... command, too |
9124 | if (presence == null) | 9162 | if (presence == null) |
9125 | { | 9163 | { |
9126 | // send to all (non-child) agents | 9164 | // send to all (non-child) agents in the parcel |
9127 | World.ForEachScenePresence(delegate(ScenePresence sp) | 9165 | World.ForEachScenePresence(delegate(ScenePresence sp) |
9128 | { | 9166 | { |
9129 | if (!sp.IsChildAgent) | 9167 | if (!sp.IsChildAgent && (sp.currentParcelUUID == landData.GlobalID)) |
9130 | { | 9168 | { |
9131 | sp.ControllingClient.SendParcelMediaCommand(0x4, // TODO what is this? | 9169 | sp.ControllingClient.SendParcelMediaCommand(0x4, // TODO what is this? |
9132 | (ParcelMediaCommandEnum)commandToSend, | 9170 | (ParcelMediaCommandEnum)commandToSend, |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index 5da6bb9..b96e977 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs | |||
@@ -316,6 +316,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
316 | public const int PRIM_POINT_LIGHT = 23; // Huh? | 316 | public const int PRIM_POINT_LIGHT = 23; // Huh? |
317 | public const int PRIM_GLOW = 25; | 317 | public const int PRIM_GLOW = 25; |
318 | public const int PRIM_TEXT = 26; | 318 | public const int PRIM_TEXT = 26; |
319 | public const int PRIM_NAME = 27; | ||
320 | public const int PRIM_DESC = 28; | ||
321 | public const int PRIM_ROT_LOCAL = 29; | ||
319 | public const int PRIM_TEXGEN_DEFAULT = 0; | 322 | public const int PRIM_TEXGEN_DEFAULT = 0; |
320 | public const int PRIM_TEXGEN_PLANAR = 1; | 323 | public const int PRIM_TEXGEN_PLANAR = 1; |
321 | 324 | ||