diff options
author | Tedd Hansen | 2007-08-18 23:24:38 +0000 |
---|---|---|
committer | Tedd Hansen | 2007-08-18 23:24:38 +0000 |
commit | 37446b0392ba423894952f81aa0f938d2bd2de22 (patch) | |
tree | 674be11acb7037c8d98fb6de34bd12e547a6c175 /OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL | |
parent | starting to add bits and pieces to physics prims that we will eventually need... (diff) | |
download | opensim-SC_OLD-37446b0392ba423894952f81aa0f938d2bd2de22.zip opensim-SC_OLD-37446b0392ba423894952f81aa0f938d2bd2de22.tar.gz opensim-SC_OLD-37446b0392ba423894952f81aa0f938d2bd2de22.tar.bz2 opensim-SC_OLD-37446b0392ba423894952f81aa0f938d2bd2de22.tar.xz |
Moved in-AppDomain event execution from Script to OpenSim.Region.ScriptEngine.Executor. Script no longer responsible for handling event calls to itself (and we can create reference cache in Executor).
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL')
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs | 38 |
1 files changed, 10 insertions, 28 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs index 7334e6f..bfb8913 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs | |||
@@ -9,8 +9,17 @@ using System.Reflection; | |||
9 | 9 | ||
10 | namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | 10 | namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL |
11 | { | 11 | { |
12 | public class LSL_BaseClass : MarshalByRefObject, LSL_BuiltIn_Commands_Interface | 12 | public class LSL_BaseClass : MarshalByRefObject, LSL_BuiltIn_Commands_Interface, IScript |
13 | { | 13 | { |
14 | private Executor m_Exec; | ||
15 | public Executor Exec { | ||
16 | get | ||
17 | { | ||
18 | if (m_Exec == null) | ||
19 | m_Exec = new Executor(this); | ||
20 | return m_Exec; | ||
21 | } | ||
22 | } | ||
14 | 23 | ||
15 | public LSL_BuiltIn_Commands_Interface m_LSL_Functions; | 24 | public LSL_BuiltIn_Commands_Interface m_LSL_Functions; |
16 | 25 | ||
@@ -48,33 +57,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
48 | return; | 57 | return; |
49 | } | 58 | } |
50 | 59 | ||
51 | public void ExecuteEvent(string FunctionName, object[] args) | ||
52 | { | ||
53 | //foreach (MemberInfo mi in this.GetType().GetMembers()) | ||
54 | //{ | ||
55 | //if (mi.ToString().ToLower().Contains("default")) | ||
56 | //{ | ||
57 | // Console.WriteLine("Member found: " + mi.ToString()); | ||
58 | //} | ||
59 | //} | ||
60 | |||
61 | Type type = this.GetType(); | ||
62 | |||
63 | Console.WriteLine("ScriptEngine Invoke: \"" + this.State() + "_event_" + FunctionName + "\""); | ||
64 | |||
65 | try | ||
66 | { | ||
67 | type.InvokeMember(this.State() + "_event_" + FunctionName, BindingFlags.InvokeMethod, null, this, args); | ||
68 | } | ||
69 | catch (Exception e) | ||
70 | { | ||
71 | // TODO: Send to correct place | ||
72 | Console.WriteLine("ScriptEngine Exception attempting to executing script function: " + e.ToString()); | ||
73 | } | ||
74 | |||
75 | |||
76 | } | ||
77 | |||
78 | 60 | ||
79 | 61 | ||
80 | // | 62 | // |