diff options
author | Melanie | 2012-07-16 21:33:16 +0100 |
---|---|---|
committer | Melanie | 2012-07-16 21:33:16 +0100 |
commit | 9e99d2036cd456a24c87dcd4b1dc63f4be469f6c (patch) | |
tree | f146d36a74ae1e9c7c63fe670cb1af1bffa35d77 /OpenSim/Region/ScriptEngine | |
parent | Merge branch 'master' into careminster (diff) | |
parent | sending more user-friendly messages to the script error window rather than th... (diff) | |
download | opensim-SC-9e99d2036cd456a24c87dcd4b1dc63f4be469f6c.zip opensim-SC-9e99d2036cd456a24c87dcd4b1dc63f4be469f6c.tar.gz opensim-SC-9e99d2036cd456a24c87dcd4b1dc63f4be469f6c.tar.bz2 opensim-SC-9e99d2036cd456a24c87dcd4b1dc63f4be469f6c.tar.xz |
Merge branch 'master' into careminster
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index bc20f71..29d0342 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -1673,9 +1673,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1673 | CheckThreatLevel(ThreatLevel.Low, "osMessageObject"); | 1673 | CheckThreatLevel(ThreatLevel.Low, "osMessageObject"); |
1674 | m_host.AddScriptLPS(1); | 1674 | m_host.AddScriptLPS(1); |
1675 | 1675 | ||
1676 | UUID objUUID; | ||
1677 | if (!UUID.TryParse(objectUUID, out objUUID)) // prior to patching, a thrown exception regarding invalid GUID format would be shouted instead. | ||
1678 | { | ||
1679 | OSSLShoutError("osMessageObject() cannot send messages to objects with invalid UUIDs"); | ||
1680 | return; | ||
1681 | } | ||
1682 | |||
1676 | object[] resobj = new object[] { new LSL_Types.LSLString(m_host.UUID.ToString()), new LSL_Types.LSLString(message) }; | 1683 | object[] resobj = new object[] { new LSL_Types.LSLString(m_host.UUID.ToString()), new LSL_Types.LSLString(message) }; |
1677 | 1684 | ||
1678 | SceneObjectPart sceneOP = World.GetSceneObjectPart(new UUID(objectUUID)); | 1685 | SceneObjectPart sceneOP = World.GetSceneObjectPart(objUUID); |
1686 | |||
1687 | if (sceneOP == null) // prior to patching, PostObjectEvent() would cause a throw exception to be shouted instead. | ||
1688 | { | ||
1689 | OSSLShoutError("osMessageObject() cannot send message to " + objUUID.ToString() + ", object was not found in scene."); | ||
1690 | return; | ||
1691 | } | ||
1679 | 1692 | ||
1680 | m_ScriptEngine.PostObjectEvent( | 1693 | m_ScriptEngine.PostObjectEvent( |
1681 | sceneOP.LocalId, new EventParams( | 1694 | sceneOP.LocalId, new EventParams( |