diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index d02f3e3..9eb3a71 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -533,6 +533,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
533 | { | 533 | { |
534 | AddEntityFromStorage(prim); | 534 | AddEntityFromStorage(prim); |
535 | SceneObjectPart rootPart = prim.GetChildPart(prim.UUID); | 535 | SceneObjectPart rootPart = prim.GetChildPart(prim.UUID); |
536 | bool UsePhysics = ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0); | ||
536 | if ((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Phantom) == 0) | 537 | if ((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Phantom) == 0) |
537 | rootPart.PhysActor = phyScene.AddPrimShape( | 538 | rootPart.PhysActor = phyScene.AddPrimShape( |
538 | rootPart.Name, | 539 | rootPart.Name, |
@@ -541,7 +542,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
541 | rootPart.AbsolutePosition.Z), | 542 | rootPart.AbsolutePosition.Z), |
542 | new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z), | 543 | new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z), |
543 | new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X, | 544 | new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X, |
544 | rootPart.RotationOffset.Y, rootPart.RotationOffset.Z)); | 545 | rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics); |
545 | } | 546 | } |
546 | MainLog.Instance.Verbose("Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)"); | 547 | MainLog.Instance.Verbose("Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)"); |
547 | } | 548 | } |
@@ -582,6 +583,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
582 | rootPart.ObjectFlags += (uint) LLObject.ObjectFlags.Phantom; | 583 | rootPart.ObjectFlags += (uint) LLObject.ObjectFlags.Phantom; |
583 | } | 584 | } |
584 | // if not phantom, add to physics | 585 | // if not phantom, add to physics |
586 | bool UsePhysics = ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0); | ||
585 | if ((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Phantom) == 0) | 587 | if ((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Phantom) == 0) |
586 | rootPart.PhysActor = | 588 | rootPart.PhysActor = |
587 | phyScene.AddPrimShape( | 589 | phyScene.AddPrimShape( |
@@ -589,7 +591,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
589 | rootPart.Shape, | 591 | rootPart.Shape, |
590 | new PhysicsVector(pos.X, pos.Y, pos.Z), | 592 | new PhysicsVector(pos.X, pos.Y, pos.Z), |
591 | new PhysicsVector(shape.Scale.X, shape.Scale.Y, shape.Scale.Z), | 593 | new PhysicsVector(shape.Scale.X, shape.Scale.Y, shape.Scale.Z), |
592 | new Quaternion()); | 594 | new Quaternion(), UsePhysics); |
593 | } | 595 | } |
594 | } | 596 | } |
595 | 597 | ||
@@ -669,6 +671,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
669 | AddEntity(obj); | 671 | AddEntity(obj); |
670 | 672 | ||
671 | SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); | 673 | SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); |
674 | bool UsePhysics = ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0); | ||
672 | if ((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Phantom) == 0) | 675 | if ((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Phantom) == 0) |
673 | rootPart.PhysActor = phyScene.AddPrimShape( | 676 | rootPart.PhysActor = phyScene.AddPrimShape( |
674 | rootPart.Name, | 677 | rootPart.Name, |
@@ -677,7 +680,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
677 | rootPart.AbsolutePosition.Z), | 680 | rootPart.AbsolutePosition.Z), |
678 | new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z), | 681 | new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z), |
679 | new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X, | 682 | new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X, |
680 | rootPart.RotationOffset.Y, rootPart.RotationOffset.Z)); | 683 | rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics); |
681 | primCount++; | 684 | primCount++; |
682 | } | 685 | } |
683 | } | 686 | } |
@@ -734,6 +737,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
734 | AddEntityFromStorage(obj); | 737 | AddEntityFromStorage(obj); |
735 | 738 | ||
736 | SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); | 739 | SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); |
740 | bool UsePhysics = ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0); | ||
737 | if ((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Phantom) == 0) | 741 | if ((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Phantom) == 0) |
738 | rootPart.PhysActor = phyScene.AddPrimShape( | 742 | rootPart.PhysActor = phyScene.AddPrimShape( |
739 | rootPart.Name, | 743 | rootPart.Name, |
@@ -742,7 +746,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
742 | rootPart.AbsolutePosition.Z), | 746 | rootPart.AbsolutePosition.Z), |
743 | new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z), | 747 | new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z), |
744 | new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X, | 748 | new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X, |
745 | rootPart.RotationOffset.Y, rootPart.RotationOffset.Z)); | 749 | rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics); |
746 | } | 750 | } |
747 | 751 | ||
748 | public void SavePrimsToXml2(string fileName) | 752 | public void SavePrimsToXml2(string fileName) |