diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 27 |
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, |