diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index ba5a46d..066f6a4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -142,7 +142,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
142 | internal float m_ScriptDelayFactor = 1.0f; | 142 | internal float m_ScriptDelayFactor = 1.0f; |
143 | internal float m_ScriptDistanceFactor = 1.0f; | 143 | internal float m_ScriptDistanceFactor = 1.0f; |
144 | internal bool m_debuggerSafe = false; | 144 | internal bool m_debuggerSafe = false; |
145 | internal Dictionary<string, FunctionPerms > m_FunctionPerms = new Dictionary<string, FunctionPerms >(); | 145 | internal Dictionary<string, FunctionPerms > m_FunctionPerms = new Dictionary<string, FunctionPerms >(); |
146 | protected IUrlModule m_UrlModule = null; | 146 | protected IUrlModule m_UrlModule = null; |
147 | 147 | ||
148 | public void Initialize( | 148 | public void Initialize( |
@@ -418,7 +418,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
418 | //Only gods may use the function | 418 | //Only gods may use the function |
419 | if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("GOD")) | 419 | if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("GOD")) |
420 | { | 420 | { |
421 | if (World.Permissions.IsGod(ownerID)) | 421 | if (World.Permissions.IsGod(ownerID)) |
422 | { | 422 | { |
423 | return String.Empty; | 423 | return String.Empty; |
424 | } | 424 | } |
@@ -427,7 +427,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
427 | //Only grid gods may use the function | 427 | //Only grid gods may use the function |
428 | if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("GRID_GOD")) | 428 | if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("GRID_GOD")) |
429 | { | 429 | { |
430 | if (World.Permissions.IsGridGod(ownerID)) | 430 | if (World.Permissions.IsGridGod(ownerID)) |
431 | { | 431 | { |
432 | return String.Empty; | 432 | return String.Empty; |
433 | } | 433 | } |
@@ -856,11 +856,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
856 | // { | 856 | // { |
857 | 857 | ||
858 | // We will launch the teleport on a new thread so that when the script threads are terminated | 858 | // We will launch the teleport on a new thread so that when the script threads are terminated |
859 | // before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting. | 859 | // before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting. |
860 | Util.FireAndForget( | 860 | Util.FireAndForget( |
861 | o => World.RequestTeleportLocation( | 861 | o => World.RequestTeleportLocation( |
862 | presence.ControllingClient, regionName, position, | 862 | presence.ControllingClient, regionName, position, |
863 | lookat, (uint)TPFlags.ViaLocation), | 863 | lookat, (uint)TPFlags.ViaLocation), |
864 | null, "OSSL_Api.TeleportAgentByRegionCoords"); | 864 | null, "OSSL_Api.TeleportAgentByRegionCoords"); |
865 | 865 | ||
866 | ScriptSleep(5000); | 866 | ScriptSleep(5000); |
@@ -906,8 +906,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
906 | // before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting. | 906 | // before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting. |
907 | Util.FireAndForget( | 907 | Util.FireAndForget( |
908 | o => World.RequestTeleportLocation( | 908 | o => World.RequestTeleportLocation( |
909 | presence.ControllingClient, regionHandle, | 909 | presence.ControllingClient, regionHandle, |
910 | position, lookat, (uint)TPFlags.ViaLocation), | 910 | position, lookat, (uint)TPFlags.ViaLocation), |
911 | null, "OSSL_Api.TeleportAgentByRegionName"); | 911 | null, "OSSL_Api.TeleportAgentByRegionName"); |
912 | 912 | ||
913 | ScriptSleep(5000); | 913 | ScriptSleep(5000); |
@@ -972,13 +972,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
972 | m_host.AddScriptLPS(1); | 972 | m_host.AddScriptLPS(1); |
973 | 973 | ||
974 | UUID targetID = new UUID(target); | 974 | UUID targetID = new UUID(target); |
975 | 975 | ||
976 | ForceSit(avatar, targetID); | 976 | ForceSit(avatar, targetID); |
977 | } | 977 | } |
978 | 978 | ||
979 | public void ForceSit(string avatar, UUID targetID) | 979 | public void ForceSit(string avatar, UUID targetID) |
980 | { | 980 | { |
981 | UUID agentID; | 981 | UUID agentID; |
982 | 982 | ||
983 | if (!UUID.TryParse(avatar, out agentID)) | 983 | if (!UUID.TryParse(avatar, out agentID)) |
984 | return; | 984 | return; |
@@ -1015,7 +1015,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1015 | ScenePresence target = (ScenePresence)World.Entities[avatarID]; | 1015 | ScenePresence target = (ScenePresence)World.Entities[avatarID]; |
1016 | return target.ControllingClient.RemoteEndPoint.Address.ToString(); | 1016 | return target.ControllingClient.RemoteEndPoint.Address.ToString(); |
1017 | } | 1017 | } |
1018 | 1018 | ||
1019 | // fall through case, just return nothing | 1019 | // fall through case, just return nothing |
1020 | return ""; | 1020 | return ""; |
1021 | } | 1021 | } |
@@ -1058,7 +1058,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1058 | ScenePresence target = null; | 1058 | ScenePresence target = null; |
1059 | if ((World.Entities[avatarID] is ScenePresence)) | 1059 | if ((World.Entities[avatarID] is ScenePresence)) |
1060 | target = (ScenePresence)World.Entities[avatarID]; | 1060 | target = (ScenePresence)World.Entities[avatarID]; |
1061 | 1061 | ||
1062 | if (target == null) | 1062 | if (target == null) |
1063 | return; | 1063 | return; |
1064 | 1064 | ||
@@ -1115,8 +1115,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1115 | else | 1115 | else |
1116 | animID = UUID.Zero; | 1116 | animID = UUID.Zero; |
1117 | } | 1117 | } |
1118 | 1118 | ||
1119 | 1119 | ||
1120 | if (animID == UUID.Zero) | 1120 | if (animID == UUID.Zero) |
1121 | target.Animator.RemoveAnimation(animation); | 1121 | target.Animator.RemoveAnimation(animation); |
1122 | else | 1122 | else |
@@ -1257,7 +1257,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1257 | public string osSetPenColor(string drawList, string color) | 1257 | public string osSetPenColor(string drawList, string color) |
1258 | { | 1258 | { |
1259 | CheckThreatLevel(ThreatLevel.None, "osSetPenColor"); | 1259 | CheckThreatLevel(ThreatLevel.None, "osSetPenColor"); |
1260 | 1260 | ||
1261 | m_host.AddScriptLPS(1); | 1261 | m_host.AddScriptLPS(1); |
1262 | drawList += "PenColor " + color + "; "; | 1262 | drawList += "PenColor " + color + "; "; |
1263 | return drawList; | 1263 | return drawList; |
@@ -1780,7 +1780,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1780 | } | 1780 | } |
1781 | return result; | 1781 | return result; |
1782 | } | 1782 | } |
1783 | 1783 | ||
1784 | private ArrayList osdToArray(OSDArray list) | 1784 | private ArrayList osdToArray(OSDArray list) |
1785 | { | 1785 | { |
1786 | ArrayList result = new ArrayList(); | 1786 | ArrayList result = new ArrayList(); |
@@ -1834,7 +1834,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1834 | m_host.AddScriptLPS(1); | 1834 | m_host.AddScriptLPS(1); |
1835 | 1835 | ||
1836 | Object decoded = osParseJSONNew(JSON); | 1836 | Object decoded = osParseJSONNew(JSON); |
1837 | 1837 | ||
1838 | if ( decoded is Hashtable ) { | 1838 | if ( decoded is Hashtable ) { |
1839 | return (Hashtable) decoded; | 1839 | return (Hashtable) decoded; |
1840 | } else if ( decoded is ArrayList ) { | 1840 | } else if ( decoded is ArrayList ) { |
@@ -1902,7 +1902,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1902 | { | 1902 | { |
1903 | // CheckThreatLevel(ThreatLevel.VeryHigh, "osDie"); | 1903 | // CheckThreatLevel(ThreatLevel.VeryHigh, "osDie"); |
1904 | // if this is restricted to objects rezzed by this host level can be reduced | 1904 | // if this is restricted to objects rezzed by this host level can be reduced |
1905 | 1905 | ||
1906 | CheckThreatLevel(ThreatLevel.Low, "osDie"); | 1906 | CheckThreatLevel(ThreatLevel.Low, "osDie"); |
1907 | m_host.AddScriptLPS(1); | 1907 | m_host.AddScriptLPS(1); |
1908 | 1908 | ||
@@ -1931,7 +1931,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1931 | 1931 | ||
1932 | if (sceneOG.OwnerID != m_host.OwnerID) | 1932 | if (sceneOG.OwnerID != m_host.OwnerID) |
1933 | return; | 1933 | return; |
1934 | 1934 | ||
1935 | // harakiri check | 1935 | // harakiri check |
1936 | if(sceneOG.UUID == m_host.ParentGroup.UUID) | 1936 | if(sceneOG.UUID == m_host.ParentGroup.UUID) |
1937 | throw new SelfDeleteException(); | 1937 | throw new SelfDeleteException(); |
@@ -2042,16 +2042,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2042 | if (assetID != UUID.Zero) | 2042 | if (assetID != UUID.Zero) |
2043 | { | 2043 | { |
2044 | StringBuilder notecardData = new StringBuilder(); | 2044 | StringBuilder notecardData = new StringBuilder(); |
2045 | 2045 | ||
2046 | for (int count = 0; count < NotecardCache.GetLines(assetID); count++) | 2046 | for (int count = 0; count < NotecardCache.GetLines(assetID); count++) |
2047 | { | 2047 | { |
2048 | string line = NotecardCache.GetLine(assetID, count) + "\n"; | 2048 | string line = NotecardCache.GetLine(assetID, count) + "\n"; |
2049 | 2049 | ||
2050 | // m_log.DebugFormat("[OSSL]: From notecard {0} loading line {1}", notecardNameOrUuid, line); | 2050 | // m_log.DebugFormat("[OSSL]: From notecard {0} loading line {1}", notecardNameOrUuid, line); |
2051 | 2051 | ||
2052 | notecardData.Append(line); | 2052 | notecardData.Append(line); |
2053 | } | 2053 | } |
2054 | 2054 | ||
2055 | return notecardData.ToString(); | 2055 | return notecardData.ToString(); |
2056 | } | 2056 | } |
2057 | 2057 | ||
@@ -2086,7 +2086,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2086 | 2086 | ||
2087 | if (a == null) | 2087 | if (a == null) |
2088 | { | 2088 | { |
2089 | // Whoops, it's still possible here that the notecard name was properly | 2089 | // Whoops, it's still possible here that the notecard name was properly |
2090 | // formatted like a UUID but isn't an asset UUID so lets look it up by name after all | 2090 | // formatted like a UUID but isn't an asset UUID so lets look it up by name after all |
2091 | assetID = SearchTaskInventoryForAssetId(notecardNameOrUuid); | 2091 | assetID = SearchTaskInventoryForAssetId(notecardNameOrUuid); |
2092 | if (assetID == UUID.Zero) | 2092 | if (assetID == UUID.Zero) |
@@ -2291,7 +2291,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2291 | } | 2291 | } |
2292 | } | 2292 | } |
2293 | } | 2293 | } |
2294 | 2294 | ||
2295 | return ""; | 2295 | return ""; |
2296 | } | 2296 | } |
2297 | 2297 | ||
@@ -2429,7 +2429,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2429 | m_host.AddScriptLPS(1); | 2429 | m_host.AddScriptLPS(1); |
2430 | 2430 | ||
2431 | IConfigSource config = m_ScriptEngine.ConfigSource; | 2431 | IConfigSource config = m_ScriptEngine.ConfigSource; |
2432 | string HomeURI = Util.GetConfigVarFromSections<string>(config, "HomeURI", | 2432 | string HomeURI = Util.GetConfigVarFromSections<string>(config, "HomeURI", |
2433 | new string[] { "Startup", "Hypergrid" }, String.Empty); | 2433 | new string[] { "Startup", "Hypergrid" }, String.Empty); |
2434 | 2434 | ||
2435 | if (!string.IsNullOrEmpty(HomeURI)) | 2435 | if (!string.IsNullOrEmpty(HomeURI)) |
@@ -2705,12 +2705,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2705 | { | 2705 | { |
2706 | CheckThreatLevel(ThreatLevel.High, "osNpcCreate"); | 2706 | CheckThreatLevel(ThreatLevel.High, "osNpcCreate"); |
2707 | m_host.AddScriptLPS(1); | 2707 | m_host.AddScriptLPS(1); |
2708 | 2708 | ||
2709 | // have to get the npc module also here to set the default Not Owned | 2709 | // have to get the npc module also here to set the default Not Owned |
2710 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | 2710 | INPCModule module = World.RequestModuleInterface<INPCModule>(); |
2711 | if(module == null) | 2711 | if(module == null) |
2712 | return new LSL_Key(UUID.Zero.ToString()); | 2712 | return new LSL_Key(UUID.Zero.ToString()); |
2713 | 2713 | ||
2714 | bool owned = (module.NPCOptionFlags & NPCOptionsFlags.AllowNotOwned) == 0; | 2714 | bool owned = (module.NPCOptionFlags & NPCOptionsFlags.AllowNotOwned) == 0; |
2715 | 2715 | ||
2716 | return NpcCreate(firstname, lastname, position, notecard, owned, false, false); | 2716 | return NpcCreate(firstname, lastname, position, notecard, owned, false, false); |
@@ -2795,7 +2795,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2795 | groupTitle = "- NPC -"; | 2795 | groupTitle = "- NPC -"; |
2796 | } | 2796 | } |
2797 | } | 2797 | } |
2798 | 2798 | ||
2799 | if((createFlags & NPCOptionsFlags.AllowCloneOtherAvatars) != 0) | 2799 | if((createFlags & NPCOptionsFlags.AllowCloneOtherAvatars) != 0) |
2800 | { | 2800 | { |
2801 | UUID id; | 2801 | UUID id; |
@@ -2973,7 +2973,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2973 | 2973 | ||
2974 | if (!module.CheckPermissions(npcId, m_host.OwnerID)) | 2974 | if (!module.CheckPermissions(npcId, m_host.OwnerID)) |
2975 | return; | 2975 | return; |
2976 | 2976 | ||
2977 | module.MoveToTarget(npcId, World, pos, false, true, false); | 2977 | module.MoveToTarget(npcId, World, pos, false, true, false); |
2978 | } | 2978 | } |
2979 | } | 2979 | } |
@@ -3202,7 +3202,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3202 | if (!module.CheckPermissions(npcId, m_host.OwnerID)) | 3202 | if (!module.CheckPermissions(npcId, m_host.OwnerID)) |
3203 | return; | 3203 | return; |
3204 | 3204 | ||
3205 | module.DeleteNPC(npcId, World); | 3205 | module.DeleteNPC(npcId, World); |
3206 | } | 3206 | } |
3207 | } | 3207 | } |
3208 | catch { } | 3208 | catch { } |
@@ -3259,7 +3259,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3259 | { | 3259 | { |
3260 | CheckThreatLevel(ThreatLevel.High, "osNpcTouch"); | 3260 | CheckThreatLevel(ThreatLevel.High, "osNpcTouch"); |
3261 | m_host.AddScriptLPS(1); | 3261 | m_host.AddScriptLPS(1); |
3262 | 3262 | ||
3263 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | 3263 | INPCModule module = World.RequestModuleInterface<INPCModule>(); |
3264 | int linkNum = link_num.value; | 3264 | int linkNum = link_num.value; |
3265 | if (module != null || (linkNum < 0 && linkNum != ScriptBaseClass.LINK_THIS)) | 3265 | if (module != null || (linkNum < 0 && linkNum != ScriptBaseClass.LINK_THIS)) |
@@ -3400,7 +3400,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3400 | bool isMale = vpShapeMale > 0.5f; | 3400 | bool isMale = vpShapeMale > 0.5f; |
3401 | return new LSL_String(isMale ? "male" : "female"); | 3401 | return new LSL_String(isMale ? "male" : "female"); |
3402 | } | 3402 | } |
3403 | 3403 | ||
3404 | /// <summary> | 3404 | /// <summary> |
3405 | /// Get current region's map texture UUID | 3405 | /// Get current region's map texture UUID |
3406 | /// </summary> | 3406 | /// </summary> |
@@ -3441,7 +3441,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3441 | 3441 | ||
3442 | return key.ToString(); | 3442 | return key.ToString(); |
3443 | } | 3443 | } |
3444 | 3444 | ||
3445 | /// <summary> | 3445 | /// <summary> |
3446 | /// Return information regarding various simulator statistics (sim fps, physics fps, time | 3446 | /// Return information regarding various simulator statistics (sim fps, physics fps, time |
3447 | /// dilation, total number of prims, total number of active scripts, script lps, various | 3447 | /// dilation, total number of prims, total number of active scripts, script lps, various |
@@ -3455,7 +3455,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3455 | m_host.AddScriptLPS(1); | 3455 | m_host.AddScriptLPS(1); |
3456 | LSL_List ret = new LSL_List(); | 3456 | LSL_List ret = new LSL_List(); |
3457 | float[] stats = World.StatsReporter.LastReportedSimStats; | 3457 | float[] stats = World.StatsReporter.LastReportedSimStats; |
3458 | 3458 | ||
3459 | for (int i = 0; i < 21; i++) | 3459 | for (int i = 0; i < 21; i++) |
3460 | { | 3460 | { |
3461 | ret.Add(new LSL_Float(stats[i])); | 3461 | ret.Add(new LSL_Float(stats[i])); |
@@ -3488,7 +3488,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3488 | 3488 | ||
3489 | return (int)pws; | 3489 | return (int)pws; |
3490 | } | 3490 | } |
3491 | 3491 | ||
3492 | public void osSetSpeed(string UUID, LSL_Float SpeedModifier) | 3492 | public void osSetSpeed(string UUID, LSL_Float SpeedModifier) |
3493 | { | 3493 | { |
3494 | CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed"); | 3494 | CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed"); |
@@ -3498,7 +3498,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3498 | if (avatar != null) | 3498 | if (avatar != null) |
3499 | avatar.SpeedModifier = (float)SpeedModifier; | 3499 | avatar.SpeedModifier = (float)SpeedModifier; |
3500 | } | 3500 | } |
3501 | 3501 | ||
3502 | public void osKickAvatar(string FirstName, string SurName, string alert) | 3502 | public void osKickAvatar(string FirstName, string SurName, string alert) |
3503 | { | 3503 | { |
3504 | CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar"); | 3504 | CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar"); |
@@ -3528,7 +3528,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3528 | if (presence != null) health = presence.Health; | 3528 | if (presence != null) health = presence.Health; |
3529 | return health; | 3529 | return health; |
3530 | } | 3530 | } |
3531 | 3531 | ||
3532 | public void osCauseDamage(string avatar, double damage) | 3532 | public void osCauseDamage(string avatar, double damage) |
3533 | { | 3533 | { |
3534 | CheckThreatLevel(ThreatLevel.High, "osCauseDamage"); | 3534 | CheckThreatLevel(ThreatLevel.High, "osCauseDamage"); |
@@ -3537,7 +3537,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3537 | UUID avatarId = new UUID(avatar); | 3537 | UUID avatarId = new UUID(avatar); |
3538 | Vector3 pos = m_host.GetWorldPosition(); | 3538 | Vector3 pos = m_host.GetWorldPosition(); |
3539 | 3539 | ||
3540 | ScenePresence presence = World.GetScenePresence(avatarId); | 3540 | ScenePresence presence = World.GetScenePresence(avatarId); |
3541 | if (presence != null) | 3541 | if (presence != null) |
3542 | { | 3542 | { |
3543 | LandData land = World.GetLandData(pos); | 3543 | LandData land = World.GetLandData(pos); |
@@ -3556,7 +3556,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3556 | } | 3556 | } |
3557 | } | 3557 | } |
3558 | } | 3558 | } |
3559 | 3559 | ||
3560 | public void osCauseHealing(string avatar, double healing) | 3560 | public void osCauseHealing(string avatar, double healing) |
3561 | { | 3561 | { |
3562 | CheckThreatLevel(ThreatLevel.High, "osCauseHealing"); | 3562 | CheckThreatLevel(ThreatLevel.High, "osCauseHealing"); |
@@ -3625,7 +3625,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3625 | CheckThreatLevel(ThreatLevel.High, "osGetPrimitiveParams"); | 3625 | CheckThreatLevel(ThreatLevel.High, "osGetPrimitiveParams"); |
3626 | m_host.AddScriptLPS(1); | 3626 | m_host.AddScriptLPS(1); |
3627 | InitLSL(); | 3627 | InitLSL(); |
3628 | 3628 | ||
3629 | return m_LSL_Api.GetPrimitiveParamsEx(prim, rules); | 3629 | return m_LSL_Api.GetPrimitiveParamsEx(prim, rules); |
3630 | } | 3630 | } |
3631 | 3631 | ||
@@ -3634,12 +3634,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3634 | CheckThreatLevel(ThreatLevel.High, "osSetPrimitiveParams"); | 3634 | CheckThreatLevel(ThreatLevel.High, "osSetPrimitiveParams"); |
3635 | m_host.AddScriptLPS(1); | 3635 | m_host.AddScriptLPS(1); |
3636 | InitLSL(); | 3636 | InitLSL(); |
3637 | 3637 | ||
3638 | m_LSL_Api.SetPrimitiveParamsEx(prim, rules, "osSetPrimitiveParams"); | 3638 | m_LSL_Api.SetPrimitiveParamsEx(prim, rules, "osSetPrimitiveParams"); |
3639 | } | 3639 | } |
3640 | 3640 | ||
3641 | /// <summary> | 3641 | /// <summary> |
3642 | /// Set parameters for light projection in host prim | 3642 | /// Set parameters for light projection in host prim |
3643 | /// </summary> | 3643 | /// </summary> |
3644 | public void osSetProjectionParams(bool projection, LSL_Key texture, double fov, double focus, double amb) | 3644 | public void osSetProjectionParams(bool projection, LSL_Key texture, double fov, double focus, double amb) |
3645 | { | 3645 | { |
@@ -3723,7 +3723,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3723 | /// Get the description from an inventory item | 3723 | /// Get the description from an inventory item |
3724 | /// </summary> | 3724 | /// </summary> |
3725 | /// <param name="inventoryName"></param> | 3725 | /// <param name="inventoryName"></param> |
3726 | /// <returns>Item description</returns> | 3726 | /// <returns>Item description</returns> |
3727 | public LSL_String osGetInventoryDesc(string item) | 3727 | public LSL_String osGetInventoryDesc(string item) |
3728 | { | 3728 | { |
3729 | m_host.AddScriptLPS(1); | 3729 | m_host.AddScriptLPS(1); |
@@ -3921,7 +3921,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3921 | if (item.InvType != (int)InventoryType.Object) | 3921 | if (item.InvType != (int)InventoryType.Object) |
3922 | { | 3922 | { |
3923 | // FIXME: Temporary null check for regression tests since they dont' have the infrastructure to set | 3923 | // FIXME: Temporary null check for regression tests since they dont' have the infrastructure to set |
3924 | // up the api reference. | 3924 | // up the api reference. |
3925 | if (m_LSL_Api != null) | 3925 | if (m_LSL_Api != null) |
3926 | ((LSL_Api)m_LSL_Api).llSay(0, string.Format("Unable to attach, item '{0}' is not an object.", itemName)); | 3926 | ((LSL_Api)m_LSL_Api).llSay(0, string.Format("Unable to attach, item '{0}' is not an object.", itemName)); |
3927 | 3927 | ||
@@ -4002,10 +4002,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4002 | UUID targetUUID; | 4002 | UUID targetUUID; |
4003 | if(!UUID.TryParse(avatar.ToString(), out targetUUID)) | 4003 | if(!UUID.TryParse(avatar.ToString(), out targetUUID)) |
4004 | return; | 4004 | return; |
4005 | 4005 | ||
4006 | if(targetUUID == UUID.Zero) | 4006 | if(targetUUID == UUID.Zero) |
4007 | return; | 4007 | return; |
4008 | 4008 | ||
4009 | ScenePresence target; | 4009 | ScenePresence target; |
4010 | if(!World.TryGetScenePresence(targetUUID, out target)) | 4010 | if(!World.TryGetScenePresence(targetUUID, out target)) |
4011 | return; | 4011 | return; |
@@ -4068,7 +4068,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4068 | return; | 4068 | return; |
4069 | } | 4069 | } |
4070 | 4070 | ||
4071 | bool optionObjCreator = (options & | 4071 | bool optionObjCreator = (options & |
4072 | ScriptBaseClass.OS_ATTACH_MSG_OBJECT_CREATOR) != 0; | 4072 | ScriptBaseClass.OS_ATTACH_MSG_OBJECT_CREATOR) != 0; |
4073 | bool optionScriptCreator = (options & | 4073 | bool optionScriptCreator = (options & |
4074 | ScriptBaseClass.OS_ATTACH_MSG_SCRIPT_CREATOR) != 0; | 4074 | ScriptBaseClass.OS_ATTACH_MSG_SCRIPT_CREATOR) != 0; |
@@ -4316,7 +4316,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4316 | { | 4316 | { |
4317 | CheckThreatLevel(ThreatLevel.Moderate, "osRequestSecureURL"); | 4317 | CheckThreatLevel(ThreatLevel.Moderate, "osRequestSecureURL"); |
4318 | m_host.AddScriptLPS(1); | 4318 | m_host.AddScriptLPS(1); |
4319 | 4319 | ||
4320 | Hashtable opts = new Hashtable(); | 4320 | Hashtable opts = new Hashtable(); |
4321 | for (int i = 0 ; i < options.Length ; i++) | 4321 | for (int i = 0 ; i < options.Length ; i++) |
4322 | { | 4322 | { |
@@ -4334,7 +4334,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4334 | { | 4334 | { |
4335 | CheckThreatLevel(ThreatLevel.Moderate, "osRequestSecureURL"); | 4335 | CheckThreatLevel(ThreatLevel.Moderate, "osRequestSecureURL"); |
4336 | m_host.AddScriptLPS(1); | 4336 | m_host.AddScriptLPS(1); |
4337 | 4337 | ||
4338 | Hashtable opts = new Hashtable(); | 4338 | Hashtable opts = new Hashtable(); |
4339 | for (int i = 0 ; i < options.Length ; i++) | 4339 | for (int i = 0 ; i < options.Length ; i++) |
4340 | { | 4340 | { |
@@ -4362,7 +4362,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4362 | m_host.CollisionSoundType = 0; // full return to default sounds | 4362 | m_host.CollisionSoundType = 0; // full return to default sounds |
4363 | else | 4363 | else |
4364 | m_host.CollisionSoundType = 2; // default sounds with volume | 4364 | m_host.CollisionSoundType = 2; // default sounds with volume |
4365 | m_host.aggregateScriptEvents(); | 4365 | m_host.aggregateScriptEvents(); |
4366 | return; | 4366 | return; |
4367 | } | 4367 | } |
4368 | // TODO: Parameter check logic required. | 4368 | // TODO: Parameter check logic required. |
@@ -4376,7 +4376,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4376 | else | 4376 | else |
4377 | m_host.CollisionSoundType = -1; | 4377 | m_host.CollisionSoundType = -1; |
4378 | 4378 | ||
4379 | m_host.aggregateScriptEvents(); | 4379 | m_host.aggregateScriptEvents(); |
4380 | } | 4380 | } |
4381 | 4381 | ||
4382 | // still not very usefull, detector is lost on rez, restarts, etc | 4382 | // still not very usefull, detector is lost on rez, restarts, etc |