diff options
author | UbitUmarov | 2012-11-02 17:40:17 +0000 |
---|---|---|
committer | UbitUmarov | 2012-11-02 17:40:17 +0000 |
commit | b8c19fe1a9dc49a060be7afce6d317d52db1983a (patch) | |
tree | 0ae074990cd947dad8826e19a65b53d7761da6fe /OpenSim/Region/Framework | |
parent | add debug position on bad primmesh error (diff) | |
download | opensim-SC-b8c19fe1a9dc49a060be7afce6d317d52db1983a.zip opensim-SC-b8c19fe1a9dc49a060be7afce6d317d52db1983a.tar.gz opensim-SC-b8c19fe1a9dc49a060be7afce6d317d52db1983a.tar.bz2 opensim-SC-b8c19fe1a9dc49a060be7afce6d317d52db1983a.tar.xz |
Create a new random when needed using normal time based seed instead of
reusing a shared one than may not be valid
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index ee61de6..6339522 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -112,7 +112,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
112 | private long timeLastChanged = 0; | 112 | private long timeLastChanged = 0; |
113 | private long m_maxPersistTime = 0; | 113 | private long m_maxPersistTime = 0; |
114 | private long m_minPersistTime = 0; | 114 | private long m_minPersistTime = 0; |
115 | private Random m_rand; | 115 | // private Random m_rand; |
116 | private List<ScenePresence> m_linkedAvatars = new List<ScenePresence>(); | 116 | private List<ScenePresence> m_linkedAvatars = new List<ScenePresence>(); |
117 | 117 | ||
118 | /// <summary> | 118 | /// <summary> |
@@ -130,6 +130,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
130 | { | 130 | { |
131 | if (value) | 131 | if (value) |
132 | { | 132 | { |
133 | |||
133 | if (m_isBackedUp) | 134 | if (m_isBackedUp) |
134 | { | 135 | { |
135 | m_scene.SceneGraph.FireChangeBackup(this); | 136 | m_scene.SceneGraph.FireChangeBackup(this); |
@@ -139,13 +140,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
139 | timeFirstChanged = DateTime.Now.Ticks; | 140 | timeFirstChanged = DateTime.Now.Ticks; |
140 | if (m_rootPart != null && m_rootPart.UUID != null && m_scene != null) | 141 | if (m_rootPart != null && m_rootPart.UUID != null && m_scene != null) |
141 | { | 142 | { |
143 | /* | ||
142 | if (m_rand == null) | 144 | if (m_rand == null) |
143 | { | 145 | { |
144 | byte[] val = new byte[16]; | 146 | byte[] val = new byte[16]; |
145 | m_rootPart.UUID.ToBytes(val, 0); | 147 | m_rootPart.UUID.ToBytes(val, 0); |
146 | m_rand = new Random(BitConverter.ToInt32(val, 0)); | 148 | m_rand = new Random(BitConverter.ToInt32(val, 0)); |
147 | } | 149 | } |
148 | 150 | */ | |
151 | Random m_rand = new Random(); | ||
149 | if (m_scene.GetRootAgentCount() == 0) | 152 | if (m_scene.GetRootAgentCount() == 0) |
150 | { | 153 | { |
151 | //If the region is empty, this change has been made by an automated process | 154 | //If the region is empty, this change has been made by an automated process |