aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorHomer Horwitz2008-10-16 21:46:03 +0000
committerHomer Horwitz2008-10-16 21:46:03 +0000
commitae9e38bf3fdc27144e0f3fa377c60506526e4c13 (patch)
treedb9515714c731464576c415d8d37021abbe9f469
parentSplit the currency module into currency and a new Combat module, because (diff)
downloadopensim-SC-ae9e38bf3fdc27144e0f3fa377c60506526e4c13.zip
opensim-SC-ae9e38bf3fdc27144e0f3fa377c60506526e4c13.tar.gz
opensim-SC-ae9e38bf3fdc27144e0f3fa377c60506526e4c13.tar.bz2
opensim-SC-ae9e38bf3fdc27144e0f3fa377c60506526e4c13.tar.xz
Fixed (mono-)script handling for SL viewer 1.21:
- Added two missing caps (UpdateScriptAgent, UpdateScriptTask) - Added one missing EventQueue event (ScriptRunningReply) - Changed DNE and XEngine to use this new event As we only use the mono engine anyway, the "Mono" checkbox is set by default but doesn't have any function.
-rw-r--r--OpenSim/Framework/Communications/Capabilities/Caps.cs2
-rw-r--r--OpenSim/Region/Environment/Modules/Framework/EventQueueHelper.cs17
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs14
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs13
4 files changed, 42 insertions, 4 deletions
diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs
index 0c52e5e..fd43e89 100644
--- a/OpenSim/Framework/Communications/Capabilities/Caps.cs
+++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs
@@ -171,6 +171,8 @@ namespace OpenSim.Framework.Communications.Capabilities
171 m_capsHandlers["UpdateScriptAgentInventory"] = m_capsHandlers["UpdateNotecardAgentInventory"]; 171 m_capsHandlers["UpdateScriptAgentInventory"] = m_capsHandlers["UpdateNotecardAgentInventory"];
172 m_capsHandlers["UpdateScriptTaskInventory"] = 172 m_capsHandlers["UpdateScriptTaskInventory"] =
173 new RestStreamHandler("POST", capsBase + m_notecardTaskUpdatePath, ScriptTaskInventory); 173 new RestStreamHandler("POST", capsBase + m_notecardTaskUpdatePath, ScriptTaskInventory);
174 m_capsHandlers["UpdateScriptAgent"] = m_capsHandlers["UpdateScriptAgentInventory"];
175 m_capsHandlers["UpdateScriptTask"] = m_capsHandlers["UpdateScriptTaskInventory"];
174 176
175 // justincc: I've disabled the CAPS service for now to fix problems with selecting textures, and 177 // justincc: I've disabled the CAPS service for now to fix problems with selecting textures, and
176 // subsequent inventory breakage, in the edit object pane (such as mantis 1085). This requires 178 // subsequent inventory breakage, in the edit object pane (such as mantis 1085). This requires
diff --git a/OpenSim/Region/Environment/Modules/Framework/EventQueueHelper.cs b/OpenSim/Region/Environment/Modules/Framework/EventQueueHelper.cs
index 93ee4f8..1e7eb59 100644
--- a/OpenSim/Region/Environment/Modules/Framework/EventQueueHelper.cs
+++ b/OpenSim/Region/Environment/Modules/Framework/EventQueueHelper.cs
@@ -146,6 +146,23 @@ namespace OpenSim.Region.Environment
146 return buildEvent("TeleportFinish", body); 146 return buildEvent("TeleportFinish", body);
147 } 147 }
148 148
149 public static LLSD ScriptRunningReplyEvent(UUID objectID, UUID itemID, bool running, bool mono)
150 {
151 LLSDMap script = new LLSDMap();
152 script.Add("ObjectID", LLSD.FromUUID(objectID));
153 script.Add("ItemID", LLSD.FromUUID(itemID));
154 script.Add("Running", LLSD.FromBoolean(running));
155 script.Add("Mono", LLSD.FromBoolean(mono));
156
157 LLSDArray scriptArr = new LLSDArray();
158 scriptArr.Add(script);
159
160 LLSDMap body = new LLSDMap();
161 body.Add("Script", scriptArr);
162
163 return buildEvent("ScriptRunningReply", body);
164 }
165
149 public static LLSD KeepAliveEvent() 166 public static LLSD KeepAliveEvent()
150 { 167 {
151 return buildEvent("FAKEEVENT", new LLSDMap()); 168 return buildEvent("FAKEEVENT", new LLSDMap());
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs
index 1c1d42f..d3269e1 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs
@@ -32,6 +32,7 @@ using log4net;
32using Nini.Config; 32using Nini.Config;
33using OpenSim.Region.Interfaces; 33using OpenSim.Region.Interfaces;
34using OpenSim.Framework; 34using OpenSim.Framework;
35using OpenSim.Region.Environment;
35using OpenSim.Region.Environment.Interfaces; 36using OpenSim.Region.Environment.Interfaces;
36using OpenSim.Region.Environment.Scenes; 37using OpenSim.Region.Environment.Scenes;
37using OpenSim.Region.ScriptEngine.Interfaces; 38using OpenSim.Region.ScriptEngine.Interfaces;
@@ -369,8 +370,17 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
369 if (id == null) 370 if (id == null)
370 return; 371 return;
371 372
372 controllingClient.SendScriptRunningReply(objectID, itemID, 373 IEventQueue eq = World.RequestModuleInterface<IEventQueue>();
373 id.Running); 374 if (eq == null)
375 {
376 controllingClient.SendScriptRunningReply(objectID, itemID,
377 id.Running);
378 }
379 else
380 {
381 eq.Enqueue(EventQueueHelper.ScriptRunningReplyEvent(objectID, itemID, id.Running, true),
382 controllingClient.AgentId);
383 }
374 } 384 }
375 385
376 public IScriptApi GetApi(UUID itemID, string name) 386 public IScriptApi GetApi(UUID itemID, string name)
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 9b78d53..86dc824 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -972,8 +972,17 @@ namespace OpenSim.Region.ScriptEngine.XEngine
972 IScriptInstance instance = GetInstance(itemID); 972 IScriptInstance instance = GetInstance(itemID);
973 if (instance == null) 973 if (instance == null)
974 return; 974 return;
975 controllingClient.SendScriptRunningReply(objectID, itemID, 975 IEventQueue eq = World.RequestModuleInterface<IEventQueue>();
976 GetScriptState(itemID)); 976 if (eq == null)
977 {
978 controllingClient.SendScriptRunningReply(objectID, itemID,
979 GetScriptState(itemID));
980 }
981 else
982 {
983 eq.Enqueue(EventQueueHelper.ScriptRunningReplyEvent(objectID, itemID, GetScriptState(itemID), true),
984 controllingClient.AgentId);
985 }
977 } 986 }
978 } 987 }
979} 988}