From 5490a3e549c2c1753bf562cef53ad70250731081 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 6 Dec 2011 19:44:45 +0100 Subject: Fix phantom and temp flags not taking --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 4 ++-- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index dd5e986..cf2161a 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -2811,11 +2811,11 @@ namespace OpenSim.Region.Framework.Scenes } } - RootPart.UpdatePrimFlags(UsePhysics, IsTemporary, IsPhantom, SetVolumeDetect); + RootPart.UpdatePrimFlags(UsePhysics, SetTemporary, SetPhantom, SetVolumeDetect); for (int i = 0; i < parts.Length; i++) { if (parts[i] != RootPart) - parts[i].UpdatePrimFlags(UsePhysics, IsTemporary, IsPhantom, SetVolumeDetect); + parts[i].UpdatePrimFlags(UsePhysics, SetTemporary, SetPhantom, SetVolumeDetect); } } } diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 3bce3c0..0e48515 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -4307,6 +4307,9 @@ namespace OpenSim.Region.Framework.Scenes bool wasPhantom = ((Flags & PrimFlags.Phantom) != 0); bool wasVD = VolumeDetectActive; +// m_log.DebugFormat("[SOP]: Old states: phys: {0} temp: {1} phan: {2} vd: {3}", wasUsingPhysics, wasTemporary, wasPhantom, wasVD); +// m_log.DebugFormat("[SOP]: New states: phys: {0} temp: {1} phan: {2} vd: {3}", UsePhysics, SetTemporary, SetPhantom, SetVD); + if ((UsePhysics == wasUsingPhysics) && (wasTemporary == SetTemporary) && (wasPhantom == SetPhantom) && (SetVD == wasVD)) return; @@ -4336,6 +4339,11 @@ namespace OpenSim.Region.Framework.Scenes SetPhantom = false; } } + else if (wasVD) + { + // Correspondingly, if VD is turned off, also turn off phantom + SetPhantom = false; + } if (UsePhysics && IsJoint()) { -- cgit v1.1