From 8e44a8e2b9a318143e8e5f8bb235356c6be5c5e5 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Mon, 11 Jul 2011 03:47:49 +0100 Subject: [PATCH] Properly regenerate physics proxy when a mesh is resized. This is done in SOP.Resize(). More common code from callers needs to be refactored into this method to reduce confusing copy/pasting --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index ce7c53af03..2026c5357c 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -2831,6 +2831,12 @@ namespace OpenSim.Region.Framework.Scenes StoreUndoState(); m_shape.Scale = scale; + // If we're a mesh/sculpt, then we need to tell the physics engine about our new size. To do this, we + // need to reinsert the sculpt data into the shape, since the physics engine deletes it when done to + // save memory + if (PhysActor != null) + CheckSculptAndLoad(); + ParentGroup.HasGroupChanged = true; ScheduleFullUpdate(); } @@ -4619,9 +4625,11 @@ namespace OpenSim.Region.Framework.Scenes /// /// Update the textures on the part. /// + /// /// Added to handle bug in libsecondlife's TextureEntry.ToBytes() /// not handling RGBA properly. Cycles through, and "fixes" the color /// info + /// /// public void UpdateTexture(Primitive.TextureEntry tex) {