diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs index 0ef909f..7b2d229 100644 --- a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs | |||
@@ -40,10 +40,13 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
40 | { | 40 | { |
41 | public class OSSL_BuilIn_Commands : LSL_BuiltIn_Commands, OSSL_BuilIn_Commands_Interface | 41 | public class OSSL_BuilIn_Commands : LSL_BuiltIn_Commands, OSSL_BuilIn_Commands_Interface |
42 | { | 42 | { |
43 | internal ScriptEngineBase.ScriptEngine m_ScriptEngineDirect; | ||
44 | |||
43 | public OSSL_BuilIn_Commands(ScriptEngineBase.ScriptEngine scriptEngine, SceneObjectPart host, uint localID, | 45 | public OSSL_BuilIn_Commands(ScriptEngineBase.ScriptEngine scriptEngine, SceneObjectPart host, uint localID, |
44 | UUID itemID) | 46 | UUID itemID) |
45 | : base(scriptEngine, host, localID, itemID) | 47 | : base(scriptEngine, host, localID, itemID) |
46 | { | 48 | { |
49 | m_ScriptEngineDirect = scriptEngine; | ||
47 | Prim = new OSSLPrim(this); | 50 | Prim = new OSSLPrim(this); |
48 | } | 51 | } |
49 | 52 | ||
@@ -577,7 +580,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
577 | { | 580 | { |
578 | UUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_itemID, new UUID(channel)); | 581 | UUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_itemID, new UUID(channel)); |
579 | object[] resobj = new object[] { new LSL_Types.LSLInteger(1), new LSL_Types.LSLString(channelID.ToString()), new LSL_Types.LSLString(UUID.Zero.ToString()), new LSL_Types.LSLString(String.Empty), new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(String.Empty) }; | 582 | object[] resobj = new object[] { new LSL_Types.LSLInteger(1), new LSL_Types.LSLString(channelID.ToString()), new LSL_Types.LSLString(UUID.Zero.ToString()), new LSL_Types.LSLString(String.Empty), new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(String.Empty) }; |
580 | m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "remote_data", new DetectParams[0], resobj); | 583 | m_ScriptEngineDirect.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "remote_data", new DetectParams[0], resobj); |
581 | } | 584 | } |
582 | } | 585 | } |
583 | 586 | ||
@@ -605,16 +608,16 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
605 | 608 | ||
606 | int scriptEngineNameIndex = 0; | 609 | int scriptEngineNameIndex = 0; |
607 | 610 | ||
608 | if (!String.IsNullOrEmpty(m_ScriptEngine.ScriptEngineName)) | 611 | if (!String.IsNullOrEmpty(m_ScriptEngineDirect.ScriptEngineName)) |
609 | { | 612 | { |
610 | // parse off the "ScriptEngine." | 613 | // parse off the "ScriptEngine." |
611 | scriptEngineNameIndex = m_ScriptEngine.ScriptEngineName.IndexOf(".", scriptEngineNameIndex); | 614 | scriptEngineNameIndex = m_ScriptEngineDirect.ScriptEngineName.IndexOf(".", scriptEngineNameIndex); |
612 | scriptEngineNameIndex++; // get past delimiter | 615 | scriptEngineNameIndex++; // get past delimiter |
613 | 616 | ||
614 | int scriptEngineNameLength = m_ScriptEngine.ScriptEngineName.Length - scriptEngineNameIndex; | 617 | int scriptEngineNameLength = m_ScriptEngineDirect.ScriptEngineName.Length - scriptEngineNameIndex; |
615 | 618 | ||
616 | // create char array then a string that is only the script engine name | 619 | // create char array then a string that is only the script engine name |
617 | Char[] scriptEngineNameCharArray = m_ScriptEngine.ScriptEngineName.ToCharArray(scriptEngineNameIndex, scriptEngineNameLength); | 620 | Char[] scriptEngineNameCharArray = m_ScriptEngineDirect.ScriptEngineName.ToCharArray(scriptEngineNameIndex, scriptEngineNameLength); |
618 | String scriptEngineName = new String(scriptEngineNameCharArray); | 621 | String scriptEngineName = new String(scriptEngineNameCharArray); |
619 | 622 | ||
620 | return scriptEngineName; | 623 | return scriptEngineName; |
@@ -805,5 +808,10 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
805 | 808 | ||
806 | return jsondata; | 809 | return jsondata; |
807 | } | 810 | } |
811 | |||
812 | internal void LSLError(string msg) | ||
813 | { | ||
814 | throw new Exception("LSL Runtime Error: " + msg); | ||
815 | } | ||
808 | } | 816 | } |
809 | } | 817 | } |