fixed mantis bug 375 (copy broken with physics/ODE enabled)
parent
aafc82cd18
commit
3586beb81b
|
@ -60,7 +60,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
protected Timer m_heartbeatTimer = new Timer();
|
||||
protected Dictionary<LLUUID, ScenePresence> Avatars;
|
||||
protected Dictionary<LLUUID, SceneObjectGroup> Prims;
|
||||
protected PhysicsScene phyScene;
|
||||
public PhysicsScene phyScene; /// publicized so it can be accessed from SceneObjectGroup.
|
||||
protected float timeStep = 0.1f;
|
||||
private Random Rand = new Random();
|
||||
private uint _primCount = 702000;
|
||||
|
|
|
@ -285,6 +285,17 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
dupe.m_regionHandle = this.m_regionHandle;
|
||||
dupe.CopyRootPart(this.m_rootPart);
|
||||
|
||||
/// may need to create a new Physics actor.
|
||||
if (dupe.RootPart.PhysActor != null)
|
||||
{
|
||||
dupe.RootPart.PhysActor = m_scene.phyScene.AddPrim(
|
||||
new PhysicsVector(dupe.RootPart.AbsolutePosition.X, dupe.RootPart.AbsolutePosition.Y, dupe.RootPart.AbsolutePosition.Z),
|
||||
new PhysicsVector(dupe.RootPart.Scale.X, dupe.RootPart.Scale.Y, dupe.RootPart.Scale.Z),
|
||||
new Axiom.Math.Quaternion(dupe.RootPart.RotationOffset.W, dupe.RootPart.RotationOffset.X,
|
||||
dupe.RootPart.RotationOffset.Y, dupe.RootPart.RotationOffset.Z));
|
||||
|
||||
}
|
||||
|
||||
List<SceneObjectPart> partList = new List<SceneObjectPart>(this.m_parts.Values);
|
||||
foreach (SceneObjectPart part in partList)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue