diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 49 |
1 files changed, 26 insertions, 23 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 42ac9aa..fa23fcd 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -2513,14 +2513,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
2513 | /// Update prim flags for this group. | 2513 | /// Update prim flags for this group. |
2514 | /// </summary> | 2514 | /// </summary> |
2515 | /// <param name="localID"></param> | 2515 | /// <param name="localID"></param> |
2516 | /// <param name="type"></param> | 2516 | /// <param name="UsePhysics"></param> |
2517 | /// <param name="inUse"></param> | 2517 | /// <param name="SetTemporary"></param> |
2518 | /// <param name="data"></param> | 2518 | /// <param name="SetPhantom"></param> |
2519 | public void UpdatePrimFlags(uint localID, bool UsePhysics, bool IsTemporary, bool IsPhantom, bool IsVolumeDetect) | 2519 | /// <param name="SetVolumeDetect"></param> |
2520 | public void UpdatePrimFlags(uint localID, bool UsePhysics, bool SetTemporary, bool SetPhantom, bool SetVolumeDetect) | ||
2520 | { | 2521 | { |
2521 | SceneObjectPart selectionPart = GetChildPart(localID); | 2522 | SceneObjectPart selectionPart = GetChildPart(localID); |
2522 | 2523 | ||
2523 | if (IsTemporary) | 2524 | if (SetTemporary) |
2524 | { | 2525 | { |
2525 | DetachFromBackup(); | 2526 | DetachFromBackup(); |
2526 | // Remove from database and parcel prim count | 2527 | // Remove from database and parcel prim count |
@@ -2545,7 +2546,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2545 | } | 2546 | } |
2546 | 2547 | ||
2547 | for (int i = 0; i < parts.Length; i++) | 2548 | for (int i = 0; i < parts.Length; i++) |
2548 | parts[i].UpdatePrimFlags(UsePhysics, IsTemporary, IsPhantom, IsVolumeDetect); | 2549 | parts[i].UpdatePrimFlags(UsePhysics, SetTemporary, SetPhantom, SetVolumeDetect); |
2549 | } | 2550 | } |
2550 | } | 2551 | } |
2551 | 2552 | ||
@@ -3287,34 +3288,36 @@ namespace OpenSim.Region.Framework.Scenes | |||
3287 | 3288 | ||
3288 | return retmass; | 3289 | return retmass; |
3289 | } | 3290 | } |
3290 | 3291 | ||
3292 | /// <summary> | ||
3293 | /// If the object is a sculpt/mesh, retrieve the mesh data for each part and reinsert it into each shape so that | ||
3294 | /// the physics engine can use it. | ||
3295 | /// </summary> | ||
3296 | /// <remarks> | ||
3297 | /// When the physics engine has finished with it, the sculpt data is discarded to save memory. | ||
3298 | /// </remarks> | ||
3291 | public void CheckSculptAndLoad() | 3299 | public void CheckSculptAndLoad() |
3292 | { | 3300 | { |
3293 | if (IsDeleted) | 3301 | if (IsDeleted) |
3294 | return; | 3302 | return; |
3303 | |||
3295 | if ((RootPart.GetEffectiveObjectFlags() & (uint)PrimFlags.Phantom) != 0) | 3304 | if ((RootPart.GetEffectiveObjectFlags() & (uint)PrimFlags.Phantom) != 0) |
3296 | return; | 3305 | return; |
3297 | 3306 | ||
3307 | // m_log.Debug("Processing CheckSculptAndLoad for {0} {1}", Name, LocalId); | ||
3308 | |||
3298 | SceneObjectPart[] parts = m_parts.GetArray(); | 3309 | SceneObjectPart[] parts = m_parts.GetArray(); |
3310 | |||
3299 | for (int i = 0; i < parts.Length; i++) | 3311 | for (int i = 0; i < parts.Length; i++) |
3300 | { | 3312 | parts[i].CheckSculptAndLoad(); |
3301 | SceneObjectPart part = parts[i]; | ||
3302 | if (part.Shape.SculptEntry && part.Shape.SculptTexture != UUID.Zero) | ||
3303 | { | ||
3304 | // check if a previously decoded sculpt map has been cached | ||
3305 | if (File.Exists(System.IO.Path.Combine("j2kDecodeCache", "smap_" + part.Shape.SculptTexture.ToString()))) | ||
3306 | { | ||
3307 | part.SculptTextureCallback(part.Shape.SculptTexture, null); | ||
3308 | } | ||
3309 | else | ||
3310 | { | ||
3311 | m_scene.AssetService.Get( | ||
3312 | part.Shape.SculptTexture.ToString(), part, AssetReceived); | ||
3313 | } | ||
3314 | } | ||
3315 | } | ||
3316 | } | 3313 | } |
3317 | 3314 | ||
3315 | /// <summary> | ||
3316 | /// Handle an asset received asynchronously from the asset service. | ||
3317 | /// </summary> | ||
3318 | /// <param name="id"></param> | ||
3319 | /// <param name="sender"></param> | ||
3320 | /// <param name="asset"></param> | ||
3318 | protected void AssetReceived(string id, Object sender, AssetBase asset) | 3321 | protected void AssetReceived(string id, Object sender, AssetBase asset) |
3319 | { | 3322 | { |
3320 | SceneObjectPart sop = (SceneObjectPart)sender; | 3323 | SceneObjectPart sop = (SceneObjectPart)sender; |