diff options
author | Kitto Flora | 2010-04-05 23:25:46 -0400 |
---|---|---|
committer | Kitto Flora | 2010-04-05 23:25:46 -0400 |
commit | a97a887ea45a756d4691bb18d655bf09653e7bde (patch) | |
tree | f9a161705c64b53bb516c63355be19f6f238aac6 | |
parent | Merge branch 'master' of ssh://3dhosting.de/var/git/careminster (diff) | |
parent | Merge branch 'master' of ssh://3dhosting.de/var/git/careminster (diff) | |
download | opensim-SC-a97a887ea45a756d4691bb18d655bf09653e7bde.zip opensim-SC-a97a887ea45a756d4691bb18d655bf09653e7bde.tar.gz opensim-SC-a97a887ea45a756d4691bb18d655bf09653e7bde.tar.bz2 opensim-SC-a97a887ea45a756d4691bb18d655bf09653e7bde.tar.xz |
Merge branch 'master' of ssh://3dhosting.de/var/git/careminster
-rw-r--r-- | OpenSim/Framework/Servers/VersionInfo.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Interfaces/ISnmpModule.cs | 11 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 48 |
3 files changed, 39 insertions, 24 deletions
diff --git a/OpenSim/Framework/Servers/VersionInfo.cs b/OpenSim/Framework/Servers/VersionInfo.cs index 58d65d1..cf417d7 100644 --- a/OpenSim/Framework/Servers/VersionInfo.cs +++ b/OpenSim/Framework/Servers/VersionInfo.cs | |||
@@ -29,11 +29,11 @@ namespace OpenSim | |||
29 | { | 29 | { |
30 | public class VersionInfo | 30 | public class VersionInfo |
31 | { | 31 | { |
32 | private const string VERSION_NUMBER = "0.6.8CM"; | 32 | private const string VERSION_NUMBER = "0.6.9CM"; |
33 | private const Flavour VERSION_FLAVOUR = Flavour.Dev; | 33 | private const Flavour VERSION_FLAVOUR = Flavour.Dev; |
34 | 34 | ||
35 | public enum Flavour | 35 | public enum Flavour |
36 | { | 36 | { |
37 | Unknown, | 37 | Unknown, |
38 | Dev, | 38 | Dev, |
39 | RC1, | 39 | RC1, |
diff --git a/OpenSim/Region/Framework/Interfaces/ISnmpModule.cs b/OpenSim/Region/Framework/Interfaces/ISnmpModule.cs new file mode 100644 index 0000000..9790fc7 --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/ISnmpModule.cs | |||
@@ -0,0 +1,11 @@ | |||
1 | /////////////////////////////////////////////////////////////////// | ||
2 | // | ||
3 | // (c) Careminster LImited, Melanie Thielker and the Meta7 Team | ||
4 | // | ||
5 | // This file is not open source. All rights reserved | ||
6 | // | ||
7 | public interface ISnmpModule | ||
8 | { | ||
9 | void Alert(string message); | ||
10 | void Trap(string message); | ||
11 | } | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 0277ed8..13d1d4e 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -106,9 +106,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
106 | private bool m_hasGroupChanged = false; | 106 | private bool m_hasGroupChanged = false; |
107 | private long timeFirstChanged = 0; | 107 | private long timeFirstChanged = 0; |
108 | private long timeLastChanged = 0; | 108 | private long timeLastChanged = 0; |
109 | long m_maxPersistTime = 0; | 109 | private long m_maxPersistTime = 0; |
110 | long m_minPersistTime = 0; | 110 | private long m_minPersistTime = 0; |
111 | Random m_rand; | 111 | private Random m_rand; |
112 | 112 | ||
113 | private System.Threading.ReaderWriterLockSlim m_partsLock = new System.Threading.ReaderWriterLockSlim(); | 113 | private System.Threading.ReaderWriterLockSlim m_partsLock = new System.Threading.ReaderWriterLockSlim(); |
114 | 114 | ||
@@ -186,27 +186,31 @@ namespace OpenSim.Region.Framework.Scenes | |||
186 | timeLastChanged = DateTime.Now.Ticks; | 186 | timeLastChanged = DateTime.Now.Ticks; |
187 | if (!m_hasGroupChanged) | 187 | if (!m_hasGroupChanged) |
188 | timeFirstChanged = DateTime.Now.Ticks; | 188 | timeFirstChanged = DateTime.Now.Ticks; |
189 | if (m_rand == null) | 189 | if (m_rootPart != null && m_rootPart.UUID != null && m_scene != null) |
190 | { | 190 | { |
191 | byte[] val = new byte[16]; | 191 | if (m_rand == null) |
192 | m_rootPart.UUID.ToBytes(val, 0); | 192 | { |
193 | m_rand = new Random(BitConverter.ToInt32(val, 0)); | 193 | byte[] val = new byte[16]; |
194 | } | 194 | m_rootPart.UUID.ToBytes(val, 0); |
195 | if (Scene.GetRootAgentCount() == 0) | 195 | m_rand = new Random(BitConverter.ToInt32(val, 0)); |
196 | { | 196 | } |
197 | //If the region is empty, this change has been made by an automated process | 197 | |
198 | //and thus we delay the persist time by a random amount between 1.5 and 2.5. | 198 | if (m_scene.GetRootAgentCount() == 0) |
199 | { | ||
200 | //If the region is empty, this change has been made by an automated process | ||
201 | //and thus we delay the persist time by a random amount between 1.5 and 2.5. | ||
199 | 202 | ||
200 | float factor = 1.5f + (float)(m_rand.NextDouble()); | 203 | float factor = 1.5f + (float)(m_rand.NextDouble()); |
201 | m_maxPersistTime = (long)((float)Scene.m_persistAfter * factor); | 204 | m_maxPersistTime = (long)((float)m_scene.m_persistAfter * factor); |
202 | m_minPersistTime = (long)((float)Scene.m_dontPersistBefore * factor); | 205 | m_minPersistTime = (long)((float)m_scene.m_dontPersistBefore * factor); |
203 | } | 206 | } |
204 | else | 207 | else |
205 | { | 208 | { |
206 | //If the region is not empty, we want to obey the minimum and maximum persist times | 209 | //If the region is not empty, we want to obey the minimum and maximum persist times |
207 | //but add a random factor so we stagger the object persistance a little | 210 | //but add a random factor so we stagger the object persistance a little |
208 | m_maxPersistTime = (long)((float)Scene.m_persistAfter * (1.0d - (m_rand.NextDouble() / 5.0d))); //Multiply by 1.0-1.5 | 211 | m_maxPersistTime = (long)((float)m_scene.m_persistAfter * (1.0d - (m_rand.NextDouble() / 5.0d))); //Multiply by 1.0-1.5 |
209 | m_minPersistTime = (long)((float)Scene.m_dontPersistBefore * (1.0d + (m_rand.NextDouble() / 2.0d))); //Multiply by 0.8-1.0 | 212 | m_minPersistTime = (long)((float)m_scene.m_dontPersistBefore * (1.0d + (m_rand.NextDouble() / 2.0d))); //Multiply by 0.8-1.0 |
213 | } | ||
210 | } | 214 | } |
211 | } | 215 | } |
212 | m_hasGroupChanged = value; | 216 | m_hasGroupChanged = value; |