From b7baa3cd2aa60324f52118e565465475c669ec80 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Fri, 9 May 2008 07:50:00 +0000 Subject: * Valid Sculpted prim now collide properly. * The first time you set the sculpted texture of a prim you might have to futz with it to get it to generate a sculpted physics proxy * Note that there are already issues in Trunk, (such as the prim scaling issue and prim jumping issue. Essentially editing is difficult right now) * This just adds to the experimental nature of trunk. :D --- OpenSim/Region/Environment/Scenes/Scene.cs | 2 +- OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 13 +++++++++++++ OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 8 ++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Environment') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 5ce3c7b..1f66744 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -1134,7 +1134,7 @@ namespace OpenSim.Region.Environment.Scenes SceneObjectPart rootPart = group.GetChildPart(group.UUID); rootPart.ObjectFlags &= ~(uint)LLObject.ObjectFlags.Scripted; rootPart.TrimPermissions(); - + group.CheckSculptAndLoad(); group.ApplyPhysics(m_physicalPrim); //rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); } diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 033a419..aae6af8 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -2546,5 +2546,18 @@ namespace OpenSim.Region.Environment.Scenes } return retmass; } + public void CheckSculptAndLoad() + { + lock (m_parts) + { + foreach (SceneObjectPart part in m_parts.Values) + { + if (part.Shape.SculptEntry && part.Shape.SculptTexture != LLUUID.Zero) + { + m_scene.AssetCache.GetAsset(part.Shape.SculptTexture, part.SculptTextureCallback, true); + } + } + } + } } } diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 0075a22..9502627 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -1568,6 +1568,10 @@ namespace OpenSim.Region.Environment.Scenes byte[] extraP = new byte[Shape.ExtraParams.Length]; Array.Copy(Shape.ExtraParams, extraP, extraP.Length); dupe.Shape.ExtraParams = extraP; + if (dupe.m_shape.SculptEntry && dupe.m_shape.SculptTexture != LLUUID.Zero) + { + m_parentGroup.Scene.AssetCache.GetAsset(dupe.m_shape.SculptTexture, dupe.SculptTextureCallback, true); + } bool UsePhysics = ((dupe.ObjectFlags & (uint) LLObject.ObjectFlags.Physics) != 0); dupe.DoPhysicsPropertyUpdate(UsePhysics, true); @@ -1939,6 +1943,10 @@ namespace OpenSim.Region.Environment.Scenes if (texture != null) { m_shape.SculptData = texture.Data; + if (PhysActor != null) + { + PhysActor.Shape = m_shape; + } } } -- cgit v1.1