All scripts are now created suspended and are only unsuspended when the object

is fully rezzed and all scripts in it are instantiated. This ensures that link
messages will not be lost on rez/region crossing and makes heavily scripted
objects reliable.
This commit is contained in:
Melanie
2010-04-19 06:29:26 +01:00
parent 7ef6dc2bac
commit 21cad5d3ac
14 changed files with 85 additions and 3 deletions

View File

@@ -95,6 +95,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
private bool m_startedFromSavedState;
private UUID m_CurrentStateHash;
private UUID m_RegionID;
private bool m_Suspended = true;
private Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>>
m_LineMap;
@@ -638,6 +639,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
/// <returns></returns>
public object EventProcessor()
{
if (m_Suspended)
return 0;
lock (m_Script)
{
EventParams data = null;
@@ -1011,5 +1015,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
{
get { return m_RegionID; }
}
public void Suspend()
{
m_Suspended = true;
}
public void Resume()
{
m_Suspended = false;
}
}
}