aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorMelanie2009-10-12 15:25:42 +0100
committerMelanie2009-10-12 15:25:42 +0100
commit170d2c4660028570902ffe67e162d88f37957580 (patch)
tree2fdcd9f8534f397d54d592b06893b4fb6784b350 /OpenSim/Region/Framework/Scenes
parentMerge branch 'master' into htb-throttle (diff)
parentOptimize ODE mesh by removing sleep. On a region with 100,000 prims and ODE e... (diff)
downloadopensim-SC-170d2c4660028570902ffe67e162d88f37957580.zip
opensim-SC-170d2c4660028570902ffe67e162d88f37957580.tar.gz
opensim-SC-170d2c4660028570902ffe67e162d88f37957580.tar.bz2
opensim-SC-170d2c4660028570902ffe67e162d88f37957580.tar.xz
Merge branch 'master' into htb-throttle
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs110
1 files changed, 54 insertions, 56 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 6a550fa..cffb23c 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2284,75 +2284,73 @@ namespace OpenSim.Region.Framework.Scenes
2284 foreach (SceneObjectPart p in sceneObject.Children.Values) 2284 foreach (SceneObjectPart p in sceneObject.Children.Values)
2285 p.LocalId = 0; 2285 p.LocalId = 0;
2286 2286
2287 if (sceneObject.RootPart.Shape.PCode == (byte)PCode.Prim) 2287 if ((sceneObject.RootPart.Shape.PCode == (byte)PCode.Prim) && (sceneObject.RootPart.Shape.State != 0)) // Attachment
2288 { 2288 {
2289 if (sceneObject.RootPart.Shape.State != 0) // Attachment 2289 sceneObject.RootPart.AddFlag(PrimFlags.TemporaryOnRez);
2290 { 2290 sceneObject.RootPart.AddFlag(PrimFlags.Phantom);
2291 sceneObject.RootPart.AddFlag(PrimFlags.TemporaryOnRez);
2292 sceneObject.RootPart.AddFlag(PrimFlags.Phantom);
2293
2294 AddRestoredSceneObject(sceneObject, false, false);
2295 2291
2296 // Handle attachment special case 2292 AddRestoredSceneObject(sceneObject, false, false);
2297 SceneObjectPart RootPrim = sceneObject.RootPart;
2298 2293
2299 // Fix up attachment Parent Local ID 2294 // Handle attachment special case
2300 ScenePresence sp = GetScenePresence(sceneObject.OwnerID); 2295 SceneObjectPart RootPrim = sceneObject.RootPart;
2301 2296
2302 //uint parentLocalID = 0; 2297 // Fix up attachment Parent Local ID
2303 if (sp != null) 2298 ScenePresence sp = GetScenePresence(sceneObject.OwnerID);
2304 {
2305 //parentLocalID = sp.LocalId;
2306
2307 //sceneObject.RootPart.IsAttachment = true;
2308 //sceneObject.RootPart.SetParentLocalId(parentLocalID);
2309
2310 SceneObjectGroup grp = sceneObject;
2311
2312 //RootPrim.SetParentLocalId(parentLocalID);
2313
2314 m_log.DebugFormat("[ATTACHMENT]: Received " +
2315 "attachment {0}, inworld asset id {1}",
2316 //grp.RootPart.LastOwnerID.ToString(),
2317 grp.GetFromItemID(),
2318 grp.UUID.ToString());
2319
2320 //grp.SetFromAssetID(grp.RootPart.LastOwnerID);
2321 m_log.DebugFormat("[ATTACHMENT]: Attach " +
2322 "to avatar {0} at position {1}",
2323 sp.UUID.ToString(), grp.AbsolutePosition);
2324 AttachObject(sp.ControllingClient,
2325 grp.LocalId, (uint)0,
2326 grp.GroupRotation,
2327 grp.AbsolutePosition, false);
2328 RootPrim.RemFlag(PrimFlags.TemporaryOnRez);
2329 grp.SendGroupFullUpdate();
2330 }
2331 else
2332 {
2333 RootPrim.RemFlag(PrimFlags.TemporaryOnRez);
2334 RootPrim.AddFlag(PrimFlags.TemporaryOnRez);
2335 }
2336 2299
2300 //uint parentLocalID = 0;
2301 if (sp != null)
2302 {
2303 //parentLocalID = sp.LocalId;
2304
2305 //sceneObject.RootPart.IsAttachment = true;
2306 //sceneObject.RootPart.SetParentLocalId(parentLocalID);
2307
2308 SceneObjectGroup grp = sceneObject;
2309
2310 //RootPrim.SetParentLocalId(parentLocalID);
2311
2312 m_log.DebugFormat("[ATTACHMENT]: Received " +
2313 "attachment {0}, inworld asset id {1}",
2314 //grp.RootPart.LastOwnerID.ToString(),
2315 grp.GetFromItemID(),
2316 grp.UUID.ToString());
2317
2318 //grp.SetFromAssetID(grp.RootPart.LastOwnerID);
2319 m_log.DebugFormat("[ATTACHMENT]: Attach " +
2320 "to avatar {0} at position {1}",
2321 sp.UUID.ToString(), grp.AbsolutePosition);
2322 AttachObject(sp.ControllingClient,
2323 grp.LocalId, (uint)0,
2324 grp.GroupRotation,
2325 grp.AbsolutePosition, false);
2326 RootPrim.RemFlag(PrimFlags.TemporaryOnRez);
2327 grp.SendGroupFullUpdate();
2337 } 2328 }
2338 else 2329 else
2339 { 2330 {
2340 AddRestoredSceneObject(sceneObject, true, false); 2331 RootPrim.RemFlag(PrimFlags.TemporaryOnRez);
2332 RootPrim.AddFlag(PrimFlags.TemporaryOnRez);
2333 }
2341 2334
2342 if (!Permissions.CanObjectEntry(sceneObject.UUID, 2335 }
2343 true, sceneObject.AbsolutePosition)) 2336 else
2344 { 2337 {
2345 // Deny non attachments based on parcel settings 2338 AddRestoredSceneObject(sceneObject, true, false);
2346 //
2347 m_log.Info("[INTERREGION]: Denied prim crossing " +
2348 "because of parcel settings");
2349 2339
2350 DeleteSceneObject(sceneObject, false); 2340 if (!Permissions.CanObjectEntry(sceneObject.UUID,
2341 true, sceneObject.AbsolutePosition))
2342 {
2343 // Deny non attachments based on parcel settings
2344 //
2345 m_log.Info("[INTERREGION]: Denied prim crossing " +
2346 "because of parcel settings");
2351 2347
2352 return false; 2348 DeleteSceneObject(sceneObject, false);
2353 } 2349
2350 return false;
2354 } 2351 }
2355 } 2352 }
2353
2356 return true; 2354 return true;
2357 } 2355 }
2358 #endregion 2356 #endregion