aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-01-15 04:14:27 +0000
committerTeravus Ovares2008-01-15 04:14:27 +0000
commit45e945616bfdab2ef57744670d3bb21acc1b3fcf (patch)
treec23956cef7294fc1f77062b41d63fdad3e19055e /OpenSim/Region/Environment/Scenes/Scene.cs
parent* Mother of all commits: (diff)
downloadopensim-SC-45e945616bfdab2ef57744670d3bb21acc1b3fcf.zip
opensim-SC-45e945616bfdab2ef57744670d3bb21acc1b3fcf.tar.gz
opensim-SC-45e945616bfdab2ef57744670d3bb21acc1b3fcf.tar.bz2
opensim-SC-45e945616bfdab2ef57744670d3bb21acc1b3fcf.tar.xz
* Pass 2 of collidable (non physical) linksets
* Linkset status is now persistent * Tweaked a physics child prim positioning hack to generate less database saves * Re-factored physics object creation calls into ApplyPhysics. To create a new physics representation of an object or linkset, it's only necessary to call *group*.ApplyPhysics(bool m_physicalPrim). *lbsa has been waiting for this refactoring* * We have collidable linksets now. (they don't become phantom anymore)
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs27
1 files changed, 3 insertions, 24 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 43486e8..86f43b3 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -908,17 +908,8 @@ namespace OpenSim.Region.Environment.Scenes
908 SceneObjectPart rootPart = group.GetChildPart(group.UUID); 908 SceneObjectPart rootPart = group.GetChildPart(group.UUID);
909 rootPart.ApplySanePermissions(); 909 rootPart.ApplySanePermissions();
910 910
911 bool UsePhysics = (((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Physics) > 0) && m_physicalPrim); 911 group.ApplyPhysics(m_physicalPrim);
912 if ((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Phantom) == 0) 912 //rootPart.DoPhysicsPropertyUpdate(UsePhysics, true);
913 rootPart.PhysActor = PhysicsScene.AddPrimShape(
914 rootPart.Name,
915 rootPart.Shape,
916 new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y,
917 rootPart.AbsolutePosition.Z),
918 new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z),
919 new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X,
920 rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics);
921 rootPart.DoPhysicsPropertyUpdate(UsePhysics, true);
922 } 913 }
923 914
924 MainLog.Instance.Verbose("SCENE", "Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)"); 915 MainLog.Instance.Verbose("SCENE", "Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)");
@@ -1054,19 +1045,7 @@ namespace OpenSim.Region.Environment.Scenes
1054 //rootPart.ObjectFlags += (uint)LLObject.ObjectFlags.Phantom; 1045 //rootPart.ObjectFlags += (uint)LLObject.ObjectFlags.Phantom;
1055 } 1046 }
1056 // if not phantom, add to physics 1047 // if not phantom, add to physics
1057 bool UsePhysics = (((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Physics) > 0) && m_physicalPrim); 1048 sceneOb.ApplyPhysics(m_physicalPrim);
1058 if ((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Phantom) == 0)
1059 {
1060 rootPart.PhysActor =
1061 PhysicsScene.AddPrimShape(
1062 rootPart.Name,
1063 rootPart.Shape,
1064 new PhysicsVector(pos.X, pos.Y, pos.Z),
1065 new PhysicsVector(shape.Scale.X, shape.Scale.Y, shape.Scale.Z),
1066 new Quaternion(), UsePhysics);
1067 // subscribe to physics events.
1068 rootPart.DoPhysicsPropertyUpdate(UsePhysics, true);
1069 }
1070 } 1049 }
1071 1050
1072 public void AddTree(LLVector3 scale, LLQuaternion rotation, LLVector3 position, 1051 public void AddTree(LLVector3 scale, LLQuaternion rotation, LLVector3 position,