aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs30
1 files 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
1440 1440
1441 public void ScriptSetPhantomStatus(bool PhantomStatus) 1441 public void ScriptSetPhantomStatus(bool PhantomStatus)
1442 { 1442 {
1443 lock (m_parts) 1443 byte[] flags = new byte[50];
1444 { 1444 // only the following 3 flags are updated by UpdatePrimFlags
1445 foreach (SceneObjectPart part in m_parts.Values) 1445 flags[46] = (byte)((RootPart.Flags & PrimFlags.Physics) != 0 ? 1 : 0);
1446 { 1446 flags[47] = (byte)((RootPart.Flags & PrimFlags.TemporaryOnRez) != 0 ? 1 : 0);
1447 if (PhantomStatus) 1447 flags[48] = (byte)(PhantomStatus ? 1 : 0);
1448 { 1448 // 94 is the packet type that comes from the ll viewer when selecting/unselecting
1449 part.AddFlag(PrimFlags.Phantom); 1449 // so pretend we are from the viewer
1450 if (part.PhysActor != null) 1450 UpdatePrimFlags(RootPart.LocalId, (ushort)94, true, flags);
1451 {
1452 m_scene.PhysicsScene.RemovePrim(part.PhysActor);
1453 }
1454 }
1455 else
1456 {
1457 part.RemFlag(PrimFlags.Phantom);
1458 if ((part.GetEffectiveObjectFlags() & (int) PrimFlags.Physics) != 0)
1459 {
1460 part.DoPhysicsPropertyUpdate(true, false);
1461 }
1462 }
1463 }
1464 }
1465 } 1451 }
1466 1452
1467 public void applyImpulse(PhysicsVector impulse) 1453 public void applyImpulse(PhysicsVector impulse)