Mantis#1659. Thank you, Melanie for a patch that:
In LSL, the state command should have an immediate effect. The OpenSim script engine seems to wait until the function ends to process the state transition.0.6.0-stable
parent
cf87a9c5fe
commit
ce5122ebf3
|
@ -99,6 +99,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
public void state(string newState)
|
public void state(string newState)
|
||||||
{
|
{
|
||||||
m_ScriptEngine.SetState(m_itemID, newState);
|
m_ScriptEngine.SetState(m_itemID, newState);
|
||||||
|
throw new EventAbortException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void llSay(int channelID, string text)
|
public void llSay(int channelID, string text)
|
||||||
|
@ -2791,6 +2792,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
m_ScriptEngine.ApiResetScript(m_itemID);
|
m_ScriptEngine.ApiResetScript(m_itemID);
|
||||||
|
throw new EventAbortException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void llMessageLinked(int linknum, int num, string msg, string id)
|
public void llMessageLinked(int linknum, int num, string msg, string id)
|
||||||
|
|
|
@ -30,6 +30,7 @@ using System.IO;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Region.Environment;
|
using OpenSim.Region.Environment;
|
||||||
|
@ -37,6 +38,20 @@ using OpenSim.Region.Environment.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.ScriptEngine.Shared
|
namespace OpenSim.Region.ScriptEngine.Shared
|
||||||
{
|
{
|
||||||
|
[Serializable]
|
||||||
|
public class EventAbortException : Exception
|
||||||
|
{
|
||||||
|
public EventAbortException()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected EventAbortException(
|
||||||
|
SerializationInfo info,
|
||||||
|
StreamingContext context)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public class DetectParams
|
public class DetectParams
|
||||||
{
|
{
|
||||||
public DetectParams()
|
public DetectParams()
|
||||||
|
|
|
@ -1296,6 +1296,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_InEvent = false;
|
m_InEvent = false;
|
||||||
|
m_CurrentEvent = String.Empty;
|
||||||
|
|
||||||
|
if (!(e is TargetInvocationException) || !(e.InnerException is EventAbortException))
|
||||||
|
{
|
||||||
if (e is System.Threading.ThreadAbortException)
|
if (e is System.Threading.ThreadAbortException)
|
||||||
{
|
{
|
||||||
lock (m_EventQueue)
|
lock (m_EventQueue)
|
||||||
|
@ -1337,6 +1341,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
lock (m_EventQueue)
|
lock (m_EventQueue)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue