diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 22 |
1 files changed, 17 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 4d20e13..5590cd5 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -1884,9 +1884,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1884 | part.Shape.LightColorR = Util.Clip((float)color.x, 0.0f, 1.0f); | 1884 | part.Shape.LightColorR = Util.Clip((float)color.x, 0.0f, 1.0f); |
1885 | part.Shape.LightColorG = Util.Clip((float)color.y, 0.0f, 1.0f); | 1885 | part.Shape.LightColorG = Util.Clip((float)color.y, 0.0f, 1.0f); |
1886 | part.Shape.LightColorB = Util.Clip((float)color.z, 0.0f, 1.0f); | 1886 | part.Shape.LightColorB = Util.Clip((float)color.z, 0.0f, 1.0f); |
1887 | part.Shape.LightIntensity = intensity; | 1887 | part.Shape.LightIntensity = Util.Clip((float)intensity, 0.0f, 1.0f); |
1888 | part.Shape.LightRadius = radius; | 1888 | part.Shape.LightRadius = Util.Clip((float)radius, 0.1f, 20.0f); |
1889 | part.Shape.LightFalloff = falloff; | 1889 | part.Shape.LightFalloff = Util.Clip((float)falloff, 0.01f, 2.0f); |
1890 | } | 1890 | } |
1891 | else | 1891 | else |
1892 | { | 1892 | { |
@@ -3162,6 +3162,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3162 | } | 3162 | } |
3163 | } | 3163 | } |
3164 | 3164 | ||
3165 | public LSL_Float llGetMassMKS() | ||
3166 | { | ||
3167 | // this is what the wiki says it does! | ||
3168 | // http://wiki.secondlife.com/wiki/LlGetMassMKS | ||
3169 | return llGetMass() * 100.0; | ||
3170 | } | ||
3171 | |||
3165 | public void llCollisionFilter(string name, string id, int accept) | 3172 | public void llCollisionFilter(string name, string id, int accept) |
3166 | { | 3173 | { |
3167 | m_host.AddScriptLPS(1); | 3174 | m_host.AddScriptLPS(1); |
@@ -4127,10 +4134,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4127 | } | 4134 | } |
4128 | } | 4135 | } |
4129 | // destination is an avatar | 4136 | // destination is an avatar |
4130 | InventoryItemBase agentItem = World.MoveTaskInventoryItem(destId, UUID.Zero, m_host, objId); | 4137 | string message; |
4138 | InventoryItemBase agentItem = World.MoveTaskInventoryItem(destId, UUID.Zero, m_host, objId, out message); | ||
4131 | 4139 | ||
4132 | if (agentItem == null) | 4140 | if (agentItem == null) |
4141 | { | ||
4142 | llSay(0, message); | ||
4133 | return; | 4143 | return; |
4144 | } | ||
4134 | 4145 | ||
4135 | if (m_TransferModule != null) | 4146 | if (m_TransferModule != null) |
4136 | { | 4147 | { |
@@ -6144,10 +6155,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6144 | if (UUID.TryParse(id, out key)) | 6155 | if (UUID.TryParse(id, out key)) |
6145 | { | 6156 | { |
6146 | ScenePresence av = World.GetScenePresence(key); | 6157 | ScenePresence av = World.GetScenePresence(key); |
6158 | List<ScenePresence> sittingAvatars = m_host.ParentGroup.GetSittingAvatars(); | ||
6147 | 6159 | ||
6148 | if (av != null) | 6160 | if (av != null) |
6149 | { | 6161 | { |
6150 | if (llAvatarOnSitTarget() == id) | 6162 | if (sittingAvatars.Contains(av)) |
6151 | { | 6163 | { |
6152 | // if the avatar is sitting on this object, then | 6164 | // if the avatar is sitting on this object, then |
6153 | // we can unsit them. We don't want random scripts unsitting random people | 6165 | // we can unsit them. We don't want random scripts unsitting random people |