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) if (userExposed)
dupe.UUID = UUID.Random(); dupe.UUID = UUID.Random();
//memberwiseclone means it also clones the physics actor reference // The PhysActor cannot be valid on a copy because the copy is not in the scene yet.
// This will make physical prim 'bounce' if not set to null. // Null it, the caller has to create a new one once the object is added to a scene
if (!userExposed) dupe.PhysActor = null;
dupe.PhysActor = null;
dupe.OwnerID = AgentID; dupe.OwnerID = AgentID;
dupe.GroupID = GroupID; dupe.GroupID = GroupID;