mirror of
https://github.com/opensim/opensim.git
synced 2026-08-03 07:26:16 +08:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user