Mantis#1640. Thank you, Chernega for a patch that addresses:

It would appear that calling llResetScript() in state_entry() causes deadlock of region. 
Probably due to llResetScript calling state_entry again. llResetScript should see who called it, 
and not recall state_entry() after a state/variable reset. Once this script is in a prim, 
the region/world/debug/script window shows it consuming the server (from 2,400 to 800,000 milliseconds).
0.6.0-stable
Charles Krinke 2008-07-01 13:42:47 +00:00
parent b8a3a27221
commit 0aaf0c4565
1 changed files with 7 additions and 2 deletions

View File

@ -866,6 +866,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
private string m_ScriptName;
private string m_Assembly;
private int m_StartParam = 0;
private string m_CurrentEvent = String.Empty;
private Dictionary<string,IScriptApi> m_Apis = new Dictionary<string,IScriptApi>();
@ -1269,6 +1270,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
}
else
{
m_CurrentEvent = data.EventName;
// m_Engine.Log.DebugFormat("[XEngine] Processed event {0}", data.EventName);
SceneObjectPart part = m_Engine.World.GetSceneObjectPart(
m_LocalID);
@ -1363,9 +1365,12 @@ namespace OpenSim.Region.ScriptEngine.XEngine
m_State = "default";
if (running)
Start();
if(m_CurrentEvent != "state_entry")
{
PostEvent(new EventParams("state_entry",
new Object[0], new DetectParams[0]));
}
}
public Dictionary<string, object> GetVars()
{