From 9a0ef22ed979433f4d017a252173f38fe5e56892 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Sat, 28 Jun 2008 16:08:12 +0000 Subject: Mantis#1616. Applied Melanie's patch. This may or may not break trunk. --- .../Region/ClientStack/LindenUDP/LLClientView.cs | 29 +++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 0294ca7..cd3efe3 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -277,6 +277,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP private RequestObjectPropertiesFamily handlerObjectGroupRequest = null; private ScriptReset handlerScriptReset = null; + private GetScriptRunning handlerGetScriptRunning = null; + private SetScriptRunning handlerSetScriptRunning = null; private UpdateVector handlerAutoPilotGo = null; /* Properties */ @@ -921,6 +923,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP public event EstateDebugRegionRequest OnEstateDebugRegionRequest; public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest; public event ScriptReset OnScriptReset; + public event GetScriptRunning OnGetScriptRunning; + public event SetScriptRunning OnSetScriptRunning; public event UpdateVector OnAutoPilotGo; #region Scene/Avatar to Client @@ -6187,7 +6191,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_log.Warn("[CLIENT]: unhandled InventoryDescent packet"); break; case PacketType.GetScriptRunning: - m_log.Warn("[CLIENT]: unhandled GetScriptRunning packet"); + GetScriptRunningPacket scriptRunning = (GetScriptRunningPacket)Pack; + handlerGetScriptRunning = OnGetScriptRunning; + if (handlerGetScriptRunning != null) + { + handlerGetScriptRunning(this, scriptRunning.Script.ObjectID, scriptRunning.Script.ItemID); + } + break; + case PacketType.SetScriptRunning: + SetScriptRunningPacket setScriptRunning = (SetScriptRunningPacket)Pack; + handlerSetScriptRunning = OnSetScriptRunning; + if (handlerSetScriptRunning != null) + { + handlerSetScriptRunning(this, setScriptRunning.Script.ObjectID, setScriptRunning.Script.ItemID, setScriptRunning.Script.Running); + } break; default: m_log.Warn("[CLIENT]: unhandled packet " + Pack.ToString()); @@ -6390,6 +6407,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP OutPacket(lsrp, ThrottleOutPacketType.Task); } + public void SendScriptRunningReply(LLUUID objectID, LLUUID itemID, bool running) + { + ScriptRunningReplyPacket scriptRunningReply = new ScriptRunningReplyPacket(); + scriptRunningReply.Script.ObjectID = objectID; + scriptRunningReply.Script.ItemID = itemID; + scriptRunningReply.Script.Running = running; + + OutPacket(scriptRunningReply, ThrottleOutPacketType.Task); + } + public void SendAsset(AssetRequestToClient req) { -- cgit v1.1