diff options
author | Melanie Thielker | 2008-09-26 15:01:03 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-09-26 15:01:03 +0000 |
commit | 24628928c3bd7148e9df6920ca8b3ed74aaafb49 (patch) | |
tree | 2dca9e3e8d06a727bb7fdbb2be28d3e76d86730a /OpenSim/Region/ScriptEngine/Common/Executor.cs | |
parent | * refactor: split out AssetXferUploader (diff) | |
download | opensim-SC_OLD-24628928c3bd7148e9df6920ca8b3ed74aaafb49.zip opensim-SC_OLD-24628928c3bd7148e9df6920ca8b3ed74aaafb49.tar.gz opensim-SC_OLD-24628928c3bd7148e9df6920ca8b3ed74aaafb49.tar.bz2 opensim-SC_OLD-24628928c3bd7148e9df6920ca8b3ed74aaafb49.tar.xz |
Add per-instance date to DNE to avoid serializing stuff 10 times a second.
Clode cleanup and removal of commented stuff in ScriptManager.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/Executor.cs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/Executor.cs b/OpenSim/Region/ScriptEngine/Common/Executor.cs index 56baa66..792004a 100644 --- a/OpenSim/Region/ScriptEngine/Common/Executor.cs +++ b/OpenSim/Region/ScriptEngine/Common/Executor.cs | |||
@@ -43,22 +43,22 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
43 | } | 43 | } |
44 | 44 | ||
45 | 45 | ||
46 | protected override scriptEvents DoGetStateEventFlags() | 46 | protected override scriptEvents DoGetStateEventFlags(string state) |
47 | { | 47 | { |
48 | // Console.WriteLine("Get event flags for " + m_Script.State); | 48 | // Console.WriteLine("Get event flags for " + state); |
49 | 49 | ||
50 | // Check to see if we've already computed the flags for this state | 50 | // Check to see if we've already computed the flags for this state |
51 | scriptEvents eventFlags = scriptEvents.None; | 51 | scriptEvents eventFlags = scriptEvents.None; |
52 | if (m_stateEvents.ContainsKey(m_Script.State)) | 52 | if (m_stateEvents.ContainsKey(state)) |
53 | { | 53 | { |
54 | m_stateEvents.TryGetValue(m_Script.State, out eventFlags); | 54 | m_stateEvents.TryGetValue(state, out eventFlags); |
55 | return eventFlags; | 55 | return eventFlags; |
56 | } | 56 | } |
57 | 57 | ||
58 | // Fill in the events for this state, cache the results in the map | 58 | // Fill in the events for this state, cache the results in the map |
59 | foreach (KeyValuePair<string, scriptEvents> kvp in m_eventFlagsMap) | 59 | foreach (KeyValuePair<string, scriptEvents> kvp in m_eventFlagsMap) |
60 | { | 60 | { |
61 | string evname = m_Script.State + "_event_" + kvp.Key; | 61 | string evname = state + "_event_" + kvp.Key; |
62 | Type type = m_Script.GetType(); | 62 | Type type = m_Script.GetType(); |
63 | try | 63 | try |
64 | { | 64 | { |
@@ -75,16 +75,16 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
75 | } | 75 | } |
76 | 76 | ||
77 | // Save the flags we just computed and return the result | 77 | // Save the flags we just computed and return the result |
78 | m_stateEvents.Add(m_Script.State, eventFlags); | 78 | m_stateEvents.Add(state, eventFlags); |
79 | return (eventFlags); | 79 | return (eventFlags); |
80 | } | 80 | } |
81 | 81 | ||
82 | protected override void DoExecuteEvent(string FunctionName, object[] args) | 82 | protected override void DoExecuteEvent(string state, string FunctionName, object[] args) |
83 | { | 83 | { |
84 | // IMPORTANT: Types and MemberInfo-derived objects require a LOT of memory. | 84 | // IMPORTANT: Types and MemberInfo-derived objects require a LOT of memory. |
85 | // Instead use RuntimeTypeHandle, RuntimeFieldHandle and RunTimeHandle (IntPtr) instead! | 85 | // Instead use RuntimeTypeHandle, RuntimeFieldHandle and RunTimeHandle (IntPtr) instead! |
86 | 86 | ||
87 | string EventName = m_Script.State + "_event_" + FunctionName; | 87 | string EventName = state + "_event_" + FunctionName; |
88 | 88 | ||
89 | //#if DEBUG | 89 | //#if DEBUG |
90 | // Console.WriteLine("ScriptEngine: Script event function name: " + EventName); | 90 | // Console.WriteLine("ScriptEngine: Script event function name: " + EventName); |