aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared
diff options
context:
space:
mode:
authorMelanie2010-04-19 06:29:26 +0100
committerMelanie2010-04-19 06:29:26 +0100
commit21cad5d3ac68ceb4ac48346835ac087ecb107446 (patch)
treeb413c2c0e42a38008bd61cdd8191787bccb45b13 /OpenSim/Region/ScriptEngine/Shared
parentSlightly tweak README to account for the fact that first-time standalone user... (diff)
downloadopensim-SC_OLD-21cad5d3ac68ceb4ac48346835ac087ecb107446.zip
opensim-SC_OLD-21cad5d3ac68ceb4ac48346835ac087ecb107446.tar.gz
opensim-SC_OLD-21cad5d3ac68ceb4ac48346835ac087ecb107446.tar.bz2
opensim-SC_OLD-21cad5d3ac68ceb4ac48346835ac087ecb107446.tar.xz
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.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index d30d2dc..74f25aa 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -95,6 +95,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
95 private bool m_startedFromSavedState; 95 private bool m_startedFromSavedState;
96 private UUID m_CurrentStateHash; 96 private UUID m_CurrentStateHash;
97 private UUID m_RegionID; 97 private UUID m_RegionID;
98 private bool m_Suspended = true;
98 99
99 private Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>> 100 private Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>>
100 m_LineMap; 101 m_LineMap;
@@ -638,6 +639,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
638 /// <returns></returns> 639 /// <returns></returns>
639 public object EventProcessor() 640 public object EventProcessor()
640 { 641 {
642 if (m_Suspended)
643 return 0;
644
641 lock (m_Script) 645 lock (m_Script)
642 { 646 {
643 EventParams data = null; 647 EventParams data = null;
@@ -1011,5 +1015,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
1011 { 1015 {
1012 get { return m_RegionID; } 1016 get { return m_RegionID; }
1013 } 1017 }
1018
1019 public void Suspend()
1020 {
1021 m_Suspended = true;
1022 }
1023
1024 public void Resume()
1025 {
1026 m_Suspended = false;
1027 }
1014 } 1028 }
1015} 1029}