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);
|
void SetMinEventDelay(UUID itemID, double delay);
|
||||||
int GetStartParameter(UUID itemID);
|
int GetStartParameter(UUID itemID);
|
||||||
|
|
||||||
void SetScriptState(UUID itemID, bool state);
|
void SetScriptState(UUID itemID, bool state, bool self);
|
||||||
bool GetScriptState(UUID itemID);
|
bool GetScriptState(UUID itemID);
|
||||||
void SetState(UUID itemID, string newState);
|
void SetState(UUID itemID, string newState);
|
||||||
void ApiResetScript(UUID itemID);
|
void ApiResetScript(UUID itemID);
|
||||||
|
|
|
@ -521,7 +521,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
if ((item = GetScriptByName(name)) != UUID.Zero)
|
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
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -1854,15 +1854,23 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetScriptState(UUID itemID, bool running)
|
public void SetScriptState(UUID itemID, bool running, bool self)
|
||||||
{
|
{
|
||||||
IScriptInstance instance = GetInstance(itemID);
|
IScriptInstance instance = GetInstance(itemID);
|
||||||
if (instance != null)
|
if (instance != null)
|
||||||
{
|
{
|
||||||
if (running)
|
if (running)
|
||||||
instance.Start();
|
instance.Start();
|
||||||
else
|
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 ();
|
throw new System.NotImplementedException ();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetScriptState(UUID itemID, bool state)
|
public void SetScriptState(UUID itemID, bool state, bool self)
|
||||||
{
|
{
|
||||||
throw new System.NotImplementedException ();
|
throw new System.NotImplementedException ();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue