aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
diff options
context:
space:
mode:
authordarok2007-11-03 10:25:43 +0000
committerdarok2007-11-03 10:25:43 +0000
commitf8e0cf0f1de3cabded7bce2e438cc37ce4bb989c (patch)
treefa9f855fc58616c24bdeed613f7f7edef395ee85 /OpenSim/Region/Environment/Scenes/Scene.cs
parentAdded temporary try catch to udpserver while testing something out (will remo... (diff)
downloadopensim-SC_OLD-f8e0cf0f1de3cabded7bce2e438cc37ce4bb989c.zip
opensim-SC_OLD-f8e0cf0f1de3cabded7bce2e438cc37ce4bb989c.tar.gz
opensim-SC_OLD-f8e0cf0f1de3cabded7bce2e438cc37ce4bb989c.tar.bz2
opensim-SC_OLD-f8e0cf0f1de3cabded7bce2e438cc37ce4bb989c.tar.xz
Changes in BulletXPlugin: Added new class BulletXActor class inherits from PhysicsActor and it's the ancestor for BulletXCharacter and BulletXPrim.Physical modifications: Changes for pass the value of Physical flag in the SceneObjectPart class to the Physics engines. New call for AddPrimShape so it has a new parameter called "isPhysical". The old call will be obselete soon (i believe). PhysActor and its descendants have a new property called IsPhysical. By the way no new special funcionallity added. It's more like preparing the way for new modifications.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs12
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)