diff options
author | Diva Canto | 2014-05-07 17:00:12 -0700 |
---|---|---|
committer | Diva Canto | 2014-05-07 17:00:12 -0700 |
commit | f4cba27105f68914de455cf6a27b9126e086cea1 (patch) | |
tree | d87599f942f1e839dc4262f18c946564528314be /OpenSim/Region/ScriptEngine/Shared/Api | |
parent | Allow Tools.Configger to take -inifile as argument (diff) | |
parent | Add GridUserService service config to [UserAccountService] in Robust[.HG].ini... (diff) | |
download | opensim-SC_OLD-f4cba27105f68914de455cf6a27b9126e086cea1.zip opensim-SC_OLD-f4cba27105f68914de455cf6a27b9126e086cea1.tar.gz opensim-SC_OLD-f4cba27105f68914de455cf6a27b9126e086cea1.tar.bz2 opensim-SC_OLD-f4cba27105f68914de455cf6a27b9126e086cea1.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
4 files changed, 28 insertions, 9 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 |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 6302455..de2c3f7 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -3397,14 +3397,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3397 | if (sp == null) | 3397 | if (sp == null) |
3398 | return; | 3398 | return; |
3399 | 3399 | ||
3400 | InventoryItemBase newItem = World.MoveTaskInventoryItem(sp.UUID, UUID.Zero, m_host, item.ItemID); | 3400 | string message; |
3401 | InventoryItemBase newItem = World.MoveTaskInventoryItem(sp.UUID, UUID.Zero, m_host, item.ItemID, out message); | ||
3401 | 3402 | ||
3402 | if (newItem == null) | 3403 | if (newItem == null) |
3403 | { | 3404 | { |
3404 | m_log.ErrorFormat( | 3405 | m_log.ErrorFormat( |
3405 | "[OSSL API]: Could not create user inventory item {0} for {1}, attach point {2} in {3}", | 3406 | "[OSSL API]: Could not create user inventory item {0} for {1}, attach point {2} in {3}: {4}", |
3406 | itemName, m_host.Name, attachmentPoint, World.Name); | 3407 | itemName, m_host.Name, attachmentPoint, World.Name, message); |
3407 | 3408 | ((LSL_Api)m_LSL_Api).llSay(0, message); | |
3408 | return; | 3409 | return; |
3409 | } | 3410 | } |
3410 | 3411 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs index 340edb3..18a1e84 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs | |||
@@ -149,6 +149,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
149 | LSL_Vector llGetLocalPos(); | 149 | LSL_Vector llGetLocalPos(); |
150 | LSL_Rotation llGetLocalRot(); | 150 | LSL_Rotation llGetLocalRot(); |
151 | LSL_Float llGetMass(); | 151 | LSL_Float llGetMass(); |
152 | LSL_Float llGetMassMKS(); | ||
152 | LSL_Integer llGetMemoryLimit(); | 153 | LSL_Integer llGetMemoryLimit(); |
153 | void llGetNextEmail(string address, string subject); | 154 | void llGetNextEmail(string address, string subject); |
154 | LSL_String llGetNotecardLine(string name, int line); | 155 | LSL_String llGetNotecardLine(string name, int line); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs index 7cd17e7..49e39fe 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs | |||
@@ -584,6 +584,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
584 | return m_LSL_Functions.llGetMass(); | 584 | return m_LSL_Functions.llGetMass(); |
585 | } | 585 | } |
586 | 586 | ||
587 | public LSL_Float llGetMassMKS() | ||
588 | { | ||
589 | return m_LSL_Functions.llGetMassMKS(); | ||
590 | } | ||
591 | |||
587 | public LSL_Integer llGetMemoryLimit() | 592 | public LSL_Integer llGetMemoryLimit() |
588 | { | 593 | { |
589 | return m_LSL_Functions.llGetMemoryLimit(); | 594 | return m_LSL_Functions.llGetMemoryLimit(); |