diff options
author | dan miller | 2007-09-29 03:56:36 +0000 |
---|---|---|
committer | dan miller | 2007-09-29 03:56:36 +0000 |
commit | a0265300aa09be0bdd2d4629d6a22394d5b219be (patch) | |
tree | 80653af30e29c664e4336896f8df239165073958 /OpenSim/Region/Environment/Scenes | |
parent | * Restored trunk (diff) | |
download | opensim-SC_OLD-a0265300aa09be0bdd2d4629d6a22394d5b219be.zip opensim-SC_OLD-a0265300aa09be0bdd2d4629d6a22394d5b219be.tar.gz opensim-SC_OLD-a0265300aa09be0bdd2d4629d6a22394d5b219be.tar.bz2 opensim-SC_OLD-a0265300aa09be0bdd2d4629d6a22394d5b219be.tar.xz |
Hollow prims (box only), thanks Gerard! Enjoy
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
4 files changed, 40 insertions, 13 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 81c0b73..bcc02ea 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -429,12 +429,17 @@ namespace OpenSim.Region.Environment.Scenes | |||
429 | group.AbsolutePosition = pos; | 429 | group.AbsolutePosition = pos; |
430 | SceneObjectPart rootPart = group.GetChildPart(group.UUID); | 430 | SceneObjectPart rootPart = group.GetChildPart(group.UUID); |
431 | if ((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Phantom) == 0) | 431 | if ((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Phantom) == 0) |
432 | rootPart.PhysActor = phyScene.AddPrim( | 432 | { |
433 | PrimitiveBaseShape pbs = rootPart.Shape; | ||
434 | rootPart.PhysActor = phyScene.AddPrimShape( | ||
435 | rootPart.Name, | ||
436 | pbs, | ||
433 | new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y, | 437 | new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y, |
434 | rootPart.AbsolutePosition.Z), | 438 | rootPart.AbsolutePosition.Z), |
435 | new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z), | 439 | new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z), |
436 | new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X, | 440 | new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X, |
437 | rootPart.RotationOffset.Y, rootPart.RotationOffset.Z)); | 441 | rootPart.RotationOffset.Y, rootPart.RotationOffset.Z)); |
442 | } | ||
438 | } | 443 | } |
439 | } | 444 | } |
440 | } \ No newline at end of file | 445 | } |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 8ad8147..579ec90 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -531,7 +531,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
531 | AddEntityFromStorage(prim); | 531 | AddEntityFromStorage(prim); |
532 | SceneObjectPart rootPart = prim.GetChildPart(prim.UUID); | 532 | SceneObjectPart rootPart = prim.GetChildPart(prim.UUID); |
533 | if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0) | 533 | if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0) |
534 | rootPart.PhysActor = phyScene.AddPrim( | 534 | rootPart.PhysActor = phyScene.AddPrimShape( |
535 | rootPart.Name, | ||
536 | rootPart.Shape, | ||
535 | new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y, | 537 | new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y, |
536 | rootPart.AbsolutePosition.Z), | 538 | rootPart.AbsolutePosition.Z), |
537 | new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z), | 539 | new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z), |
@@ -579,7 +581,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
579 | // if not phantom, add to physics | 581 | // if not phantom, add to physics |
580 | if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0) | 582 | if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0) |
581 | rootPart.PhysActor = | 583 | rootPart.PhysActor = |
582 | phyScene.AddPrim(new PhysicsVector(pos.X, pos.Y, pos.Z), | 584 | phyScene.AddPrimShape( |
585 | rootPart.Name, | ||
586 | rootPart.Shape, | ||
587 | new PhysicsVector(pos.X, pos.Y, pos.Z), | ||
583 | new PhysicsVector(shape.Scale.X, shape.Scale.Y, shape.Scale.Z), | 588 | new PhysicsVector(shape.Scale.X, shape.Scale.Y, shape.Scale.Z), |
584 | new Quaternion()); | 589 | new Quaternion()); |
585 | } | 590 | } |
@@ -662,7 +667,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
662 | 667 | ||
663 | SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); | 668 | SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); |
664 | if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0) | 669 | if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0) |
665 | rootPart.PhysActor = phyScene.AddPrim( | 670 | rootPart.PhysActor = phyScene.AddPrimShape( |
671 | rootPart.Name, | ||
672 | rootPart.Shape, | ||
666 | new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y, | 673 | new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y, |
667 | rootPart.AbsolutePosition.Z), | 674 | rootPart.AbsolutePosition.Z), |
668 | new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z), | 675 | new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z), |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 890008d..da9f366 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -314,12 +314,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
314 | /// may need to create a new Physics actor. | 314 | /// may need to create a new Physics actor. |
315 | if (dupe.RootPart.PhysActor != null) | 315 | if (dupe.RootPart.PhysActor != null) |
316 | { | 316 | { |
317 | dupe.RootPart.PhysActor = m_scene.PhysScene.AddPrim( | 317 | PrimitiveBaseShape pbs = dupe.RootPart.Shape; |
318 | new PhysicsVector(dupe.RootPart.AbsolutePosition.X, dupe.RootPart.AbsolutePosition.Y, | 318 | |
319 | dupe.RootPart.AbsolutePosition.Z), | 319 | dupe.RootPart.PhysActor = m_scene.PhysScene.AddPrimShape( |
320 | new PhysicsVector(dupe.RootPart.Scale.X, dupe.RootPart.Scale.Y, dupe.RootPart.Scale.Z), | 320 | dupe.RootPart.Name, |
321 | new Quaternion(dupe.RootPart.RotationOffset.W, dupe.RootPart.RotationOffset.X, | 321 | pbs, |
322 | dupe.RootPart.RotationOffset.Y, dupe.RootPart.RotationOffset.Z)); | 322 | new PhysicsVector(dupe.RootPart.AbsolutePosition.X, dupe.RootPart.AbsolutePosition.Y, dupe.RootPart.AbsolutePosition.Z), |
323 | new PhysicsVector(dupe.RootPart.Scale.X, dupe.RootPart.Scale.Y, dupe.RootPart.Scale.Z), | ||
324 | new Axiom.Math.Quaternion(dupe.RootPart.RotationOffset.W, dupe.RootPart.RotationOffset.X, | ||
325 | dupe.RootPart.RotationOffset.Y, dupe.RootPart.RotationOffset.Z)); | ||
326 | |||
323 | } | 327 | } |
324 | 328 | ||
325 | List<SceneObjectPart> partList = new List<SceneObjectPart>(m_parts.Values); | 329 | List<SceneObjectPart> partList = new List<SceneObjectPart>(m_parts.Values); |
@@ -838,6 +842,17 @@ namespace OpenSim.Region.Environment.Scenes | |||
838 | { | 842 | { |
839 | part.UpdateShape(shapeBlock); | 843 | part.UpdateShape(shapeBlock); |
840 | } | 844 | } |
845 | if (m_rootPart.PhysActor != null) | ||
846 | { | ||
847 | this.m_scene.PhysScene.RemovePrim(m_rootPart.PhysActor); | ||
848 | m_rootPart.PhysActor = m_scene.PhysScene.AddPrimShape( | ||
849 | m_rootPart.Name, | ||
850 | m_rootPart.Shape, | ||
851 | new PhysicsVector(m_rootPart.AbsolutePosition.X, m_rootPart.AbsolutePosition.Y, m_rootPart.AbsolutePosition.Z), | ||
852 | new PhysicsVector(m_rootPart.Scale.X, m_rootPart.Scale.Y, m_rootPart.Scale.Z), | ||
853 | new Axiom.Math.Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, | ||
854 | m_rootPart.RotationOffset.Y, m_rootPart.RotationOffset.Z)); | ||
855 | } | ||
841 | } | 856 | } |
842 | 857 | ||
843 | #endregion | 858 | #endregion |
@@ -1252,4 +1267,4 @@ namespace OpenSim.Region.Environment.Scenes | |||
1252 | Text = text; | 1267 | Text = text; |
1253 | } | 1268 | } |
1254 | } | 1269 | } |
1255 | } \ No newline at end of file | 1270 | } |
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 0338572..428b771 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -914,7 +914,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
914 | new PhysicsVector(AbsolutePosition.X, AbsolutePosition.Y, | 914 | new PhysicsVector(AbsolutePosition.X, AbsolutePosition.Y, |
915 | AbsolutePosition.Z); | 915 | AbsolutePosition.Z); |
916 | 916 | ||
917 | m_physicsActor = scene.AddAvatar(pVec); | 917 | m_physicsActor = scene.AddAvatar(this.Firstname+"."+this.Lastname, pVec); |
918 | } | 918 | } |
919 | 919 | ||
920 | internal void Close() | 920 | internal void Close() |