diff options
author | Melanie | 2009-10-12 15:12:15 +0100 |
---|---|---|
committer | Melanie | 2009-10-12 15:12:15 +0100 |
commit | 70553a979e551efc47f56930282c6b01ff4277e1 (patch) | |
tree | 347632a3f51e7eace08e383f17b7f3e5ad218610 /OpenSim/Region/Framework/Scenes/Scene.cs | |
parent | Merge branch 'master' into vehicles (diff) | |
parent | Optimize ODE mesh by removing sleep. On a region with 100,000 prims and ODE e... (diff) | |
download | opensim-SC_OLD-70553a979e551efc47f56930282c6b01ff4277e1.zip opensim-SC_OLD-70553a979e551efc47f56930282c6b01ff4277e1.tar.gz opensim-SC_OLD-70553a979e551efc47f56930282c6b01ff4277e1.tar.bz2 opensim-SC_OLD-70553a979e551efc47f56930282c6b01ff4277e1.tar.xz |
Merge branch 'master' into vehicles
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 110 |
1 files changed, 54 insertions, 56 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 9630236..03111a6 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 |