prevent self call to llSetScriptState(ownname,FALSE) from blocking entire engine
parent
b6329fb784
commit
4ebb4e371f
|
@ -68,7 +68,7 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
|
|||
void SetMinEventDelay(UUID itemID, double delay);
|
||||
int GetStartParameter(UUID itemID);
|
||||
|
||||
void SetScriptState(UUID itemID, bool state);
|
||||
void SetScriptState(UUID itemID, bool state, bool self);
|
||||
bool GetScriptState(UUID itemID);
|
||||
void SetState(UUID itemID, string newState);
|
||||
void ApiResetScript(UUID itemID);
|
||||
|
|
|
@ -521,7 +521,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
|
||||
if ((item = GetScriptByName(name)) != UUID.Zero)
|
||||
{
|
||||
m_ScriptEngine.SetScriptState(item, run == 0 ? false : true);
|
||||
m_ScriptEngine.SetScriptState(item, run == 0 ? false : true, item == m_item.ItemID);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1854,15 +1854,23 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
|||
return instance;
|
||||
}
|
||||
|
||||
public void SetScriptState(UUID itemID, bool running)
|
||||
public void SetScriptState(UUID itemID, bool running, bool self)
|
||||
{
|
||||
IScriptInstance instance = GetInstance(itemID);
|
||||
if (instance != null)
|
||||
{
|
||||
if (running)
|
||||
instance.Start();
|
||||
instance.Start();
|
||||
else
|
||||
instance.Stop(100);
|
||||
{
|
||||
if(self)
|
||||
{
|
||||
instance.Running = false;
|
||||
throw new EventAbortException();
|
||||
}
|
||||
else
|
||||
instance.Stop(100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -221,7 +221,7 @@ namespace OpenSim.Tests.Common
|
|||
throw new System.NotImplementedException ();
|
||||
}
|
||||
|
||||
public void SetScriptState(UUID itemID, bool state)
|
||||
public void SetScriptState(UUID itemID, bool state, bool self)
|
||||
{
|
||||
throw new System.NotImplementedException ();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue