Null PhysActor on SOP.Copy() to prevent clobbering the original one

avinationmerge
Melanie 2012-03-06 20:20:12 +01:00
parent de03d1ece0
commit 17b1454d6f
1 changed files with 3 additions and 4 deletions

View File

@ -1691,10 +1691,9 @@ namespace OpenSim.Region.Framework.Scenes
if (userExposed)
dupe.UUID = UUID.Random();
//memberwiseclone means it also clones the physics actor reference
// This will make physical prim 'bounce' if not set to null.
if (!userExposed)
dupe.PhysActor = null;
// The PhysActor cannot be valid on a copy because the copy is not in the scene yet.
// Null it, the caller has to create a new one once the object is added to a scene
dupe.PhysActor = null;
dupe.OwnerID = AgentID;
dupe.GroupID = GroupID;