diff options
author | Melanie Thielker | 2008-11-29 13:17:21 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-11-29 13:17:21 +0000 |
commit | 1b3a3ffc7781a468f40841ee291d3f1e0fe22957 (patch) | |
tree | 3539571d9da669ed83ce0b1e7c0cc70b2dd12bd9 /OpenSim/Region/Environment/Scenes/Scene.cs | |
parent | Add the lifetime management back into the LSL_Api, since that will also (diff) | |
download | opensim-SC-1b3a3ffc7781a468f40841ee291d3f1e0fe22957.zip opensim-SC-1b3a3ffc7781a468f40841ee291d3f1e0fe22957.tar.gz opensim-SC-1b3a3ffc7781a468f40841ee291d3f1e0fe22957.tar.bz2 opensim-SC-1b3a3ffc7781a468f40841ee291d3f1e0fe22957.tar.xz |
Finally make attachments stay put. Randomize local ID generation to
prevent adjacent sims from using identical Local IDs for the attachment
Thanks to Mana Janus (Hippo Viewer) for providing the crucial bit of
information, namely that, due to a bug in the viewer, adjacent sims can't
use the same local ids.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index c8285a3..03d79f1 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -269,6 +269,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
269 | { | 269 | { |
270 | m_config = config; | 270 | m_config = config; |
271 | 271 | ||
272 | Random random = new Random(); | ||
273 | m_lastAllocatedLocalId = (uint)(random.NextDouble() * (double)(uint.MaxValue/2))+(uint)(uint.MaxValue/4); | ||
272 | m_moduleLoader = moduleLoader; | 274 | m_moduleLoader = moduleLoader; |
273 | m_authenticateHandler = authen; | 275 | m_authenticateHandler = authen; |
274 | CommsManager = commsMan; | 276 | CommsManager = commsMan; |
@@ -2182,12 +2184,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
2182 | // | 2184 | // |
2183 | SceneObjectPart RootPrim = GetSceneObjectPart(primID); | 2185 | SceneObjectPart RootPrim = GetSceneObjectPart(primID); |
2184 | 2186 | ||
2185 | RootPrim.SetParentLocalId(parentLocalID); | ||
2186 | |||
2187 | if (RootPrim != null) | 2187 | if (RootPrim != null) |
2188 | { | 2188 | { |
2189 | SceneObjectGroup grp = RootPrim.ParentGroup; | 2189 | SceneObjectGroup grp = RootPrim.ParentGroup; |
2190 | 2190 | ||
2191 | RootPrim.SetParentLocalId(parentLocalID); | ||
2192 | |||
2191 | if (grp != null) | 2193 | if (grp != null) |
2192 | { | 2194 | { |
2193 | m_log.DebugFormat("[ATTACHMENT]: Received "+ | 2195 | m_log.DebugFormat("[ATTACHMENT]: Received "+ |
@@ -2205,6 +2207,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2205 | grp.LocalId, (uint)0, | 2207 | grp.LocalId, (uint)0, |
2206 | grp.GroupRotation, | 2208 | grp.GroupRotation, |
2207 | grp.AbsolutePosition, false); | 2209 | grp.AbsolutePosition, false); |
2210 | grp.SendGroupFullUpdate(); | ||
2208 | } | 2211 | } |
2209 | else | 2212 | else |
2210 | { | 2213 | { |