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.0.6.0-stable
parent
4bbc28e445
commit
ae9e38bf3f
|
@ -171,6 +171,8 @@ namespace OpenSim.Framework.Communications.Capabilities
|
|||
m_capsHandlers["UpdateScriptAgentInventory"] = m_capsHandlers["UpdateNotecardAgentInventory"];
|
||||
m_capsHandlers["UpdateScriptTaskInventory"] =
|
||||
new RestStreamHandler("POST", capsBase + m_notecardTaskUpdatePath, ScriptTaskInventory);
|
||||
m_capsHandlers["UpdateScriptAgent"] = m_capsHandlers["UpdateScriptAgentInventory"];
|
||||
m_capsHandlers["UpdateScriptTask"] = m_capsHandlers["UpdateScriptTaskInventory"];
|
||||
|
||||
// justincc: I've disabled the CAPS service for now to fix problems with selecting textures, and
|
||||
// subsequent inventory breakage, in the edit object pane (such as mantis 1085). This requires
|
||||
|
|
|
@ -146,6 +146,23 @@ namespace OpenSim.Region.Environment
|
|||
return buildEvent("TeleportFinish", body);
|
||||
}
|
||||
|
||||
public static LLSD ScriptRunningReplyEvent(UUID objectID, UUID itemID, bool running, bool mono)
|
||||
{
|
||||
LLSDMap script = new LLSDMap();
|
||||
script.Add("ObjectID", LLSD.FromUUID(objectID));
|
||||
script.Add("ItemID", LLSD.FromUUID(itemID));
|
||||
script.Add("Running", LLSD.FromBoolean(running));
|
||||
script.Add("Mono", LLSD.FromBoolean(mono));
|
||||
|
||||
LLSDArray scriptArr = new LLSDArray();
|
||||
scriptArr.Add(script);
|
||||
|
||||
LLSDMap body = new LLSDMap();
|
||||
body.Add("Script", scriptArr);
|
||||
|
||||
return buildEvent("ScriptRunningReply", body);
|
||||
}
|
||||
|
||||
public static LLSD KeepAliveEvent()
|
||||
{
|
||||
return buildEvent("FAKEEVENT", new LLSDMap());
|
||||
|
|
|
@ -32,6 +32,7 @@ using log4net;
|
|||
using Nini.Config;
|
||||
using OpenSim.Region.Interfaces;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.Environment;
|
||||
using OpenSim.Region.Environment.Interfaces;
|
||||
using OpenSim.Region.Environment.Scenes;
|
||||
using OpenSim.Region.ScriptEngine.Interfaces;
|
||||
|
@ -369,8 +370,17 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
|
|||
if (id == null)
|
||||
return;
|
||||
|
||||
controllingClient.SendScriptRunningReply(objectID, itemID,
|
||||
id.Running);
|
||||
IEventQueue eq = World.RequestModuleInterface<IEventQueue>();
|
||||
if (eq == null)
|
||||
{
|
||||
controllingClient.SendScriptRunningReply(objectID, itemID,
|
||||
id.Running);
|
||||
}
|
||||
else
|
||||
{
|
||||
eq.Enqueue(EventQueueHelper.ScriptRunningReplyEvent(objectID, itemID, id.Running, true),
|
||||
controllingClient.AgentId);
|
||||
}
|
||||
}
|
||||
|
||||
public IScriptApi GetApi(UUID itemID, string name)
|
||||
|
|
|
@ -972,8 +972,17 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
|||
IScriptInstance instance = GetInstance(itemID);
|
||||
if (instance == null)
|
||||
return;
|
||||
controllingClient.SendScriptRunningReply(objectID, itemID,
|
||||
GetScriptState(itemID));
|
||||
IEventQueue eq = World.RequestModuleInterface<IEventQueue>();
|
||||
if (eq == null)
|
||||
{
|
||||
controllingClient.SendScriptRunningReply(objectID, itemID,
|
||||
GetScriptState(itemID));
|
||||
}
|
||||
else
|
||||
{
|
||||
eq.Enqueue(EventQueueHelper.ScriptRunningReplyEvent(objectID, itemID, GetScriptState(itemID), true),
|
||||
controllingClient.AgentId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue