From e08c4376f750f32396e939cb2a985ad36cc10974 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Fri, 7 Nov 2008 19:02:55 +0000 Subject: * Apply http://opensimulator.org/mantis/view.php?id=1883 * Fix llSetStatus() and llSetPrimitiveParams() * Thanks idb --- .../Region/Environment/Scenes/SceneObjectGroup.cs | 30 ++++++---------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 2c559a3..093024e 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -1440,28 +1440,14 @@ namespace OpenSim.Region.Environment.Scenes public void ScriptSetPhantomStatus(bool PhantomStatus) { - lock (m_parts) - { - foreach (SceneObjectPart part in m_parts.Values) - { - if (PhantomStatus) - { - part.AddFlag(PrimFlags.Phantom); - if (part.PhysActor != null) - { - m_scene.PhysicsScene.RemovePrim(part.PhysActor); - } - } - else - { - part.RemFlag(PrimFlags.Phantom); - if ((part.GetEffectiveObjectFlags() & (int) PrimFlags.Physics) != 0) - { - part.DoPhysicsPropertyUpdate(true, false); - } - } - } - } + byte[] flags = new byte[50]; + // only the following 3 flags are updated by UpdatePrimFlags + flags[46] = (byte)((RootPart.Flags & PrimFlags.Physics) != 0 ? 1 : 0); + flags[47] = (byte)((RootPart.Flags & PrimFlags.TemporaryOnRez) != 0 ? 1 : 0); + flags[48] = (byte)(PhantomStatus ? 1 : 0); + // 94 is the packet type that comes from the ll viewer when selecting/unselecting + // so pretend we are from the viewer + UpdatePrimFlags(RootPart.LocalId, (ushort)94, true, flags); } public void applyImpulse(PhysicsVector impulse) -- cgit v1.1