From 9a8742e838cdefba925292d554a2f8bc9a6b3806 Mon Sep 17 00:00:00 2001 From: MW Date: Thu, 23 Aug 2007 10:53:42 +0000 Subject: Added danx0r's physics patch, although for now have disabled the lines in Scene.cs, as any changes to prims (like size or position changes) are only updated to the physics engine when you restart opensim. Also prims aren't deleted from the physics engine. These shouldn't be hard to fix. --- OpenSim/Region/Environment/Scenes/Scene.cs | 12 ++++++++++++ OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 1 + 2 files changed, 13 insertions(+) (limited to 'OpenSim/Region/Environment') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 91ff0a8..7317361 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -503,6 +503,11 @@ namespace OpenSim.Region.Environment.Scenes foreach (SceneObjectGroup prim in PrimsFromDB) { AddEntityFromStorage(prim); + // phyScene.AddPrim( + // new PhysicsVector(prim.RootPart.AbsolutePosition.X, prim.RootPart.AbsolutePosition.Y, prim.RootPart.AbsolutePosition.Z), + // new PhysicsVector(prim.RootPart.Scale.X, prim.RootPart.Scale.Y, prim.RootPart.Scale.Z), + // new Axiom.Math.Quaternion(prim.RootPart.RotationOffset.W, prim.RootPart.RotationOffset.X, + // prim.RootPart.RotationOffset.Y, prim.RootPart.RotationOffset.Z)); } MainLog.Instance.Verbose("Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)"); } @@ -540,6 +545,8 @@ namespace OpenSim.Region.Environment.Scenes { SceneObjectGroup sceneOb = new SceneObjectGroup(this, this.m_regionHandle, ownerID, PrimIDAllocate(), pos, shape); AddEntity(sceneOb); + //phyScene.AddPrim(new PhysicsVector(pos.X, pos.Y, pos.Z), new PhysicsVector(shape.Scale.X, shape.Scale.Y, shape.Scale.Z), + // new Axiom.Math.Quaternion()); } public void RemovePrim(uint localID, LLUUID avatar_deleter) @@ -615,6 +622,11 @@ namespace OpenSim.Region.Environment.Scenes //if we want this to be a import method then we need new uuids for the object to avoid any clashes //obj.RegenerateFullIDs(); AddEntity(obj); + // phyScene.AddPrim( + // new PhysicsVector(obj.RootPart.AbsolutePosition.X, obj.RootPart.AbsolutePosition.Y, obj.RootPart.AbsolutePosition.Z), + // new PhysicsVector(obj.RootPart.Scale.X, obj.RootPart.Scale.Y, obj.RootPart.Scale.Z), + // new Axiom.Math.Quaternion(obj.RootPart.RotationOffset.W, obj.RootPart.RotationOffset.X, + // obj.RootPart.RotationOffset.Y, obj.RootPart.RotationOffset.Z)); primCount++; } } diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index c3d70ea..56ac9be 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -57,6 +57,7 @@ namespace OpenSim.Region.Environment.Scenes public SceneObjectPart RootPart { + get { return this.m_rootPart; } set { m_rootPart = value; } } -- cgit v1.1