diff options
author | Justin Clarke Casey | 2009-02-03 17:50:25 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-02-03 17:50:25 +0000 |
commit | a9e76ce8470062f7e9a1de3a314fd37e675e25a9 (patch) | |
tree | ee5cd26fe3f8fea8249b09c54edd1f1400b1c963 /OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |
parent | * Fixes mantis #3070 (diff) | |
download | opensim-SC_OLD-a9e76ce8470062f7e9a1de3a314fd37e675e25a9.zip opensim-SC_OLD-a9e76ce8470062f7e9a1de3a314fd37e675e25a9.tar.gz opensim-SC_OLD-a9e76ce8470062f7e9a1de3a314fd37e675e25a9.tar.bz2 opensim-SC_OLD-a9e76ce8470062f7e9a1de3a314fd37e675e25a9.tar.xz |
* minor: remove some pointless assignments in SOG.Copy() that had already been done by MemberwiseClone()
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 908bb0d..d026180 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -1053,7 +1053,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
1053 | { | 1053 | { |
1054 | part.StoreUndoState(); | 1054 | part.StoreUndoState(); |
1055 | part.OnGrab(offsetPos, remoteClient); | 1055 | part.OnGrab(offsetPos, remoteClient); |
1056 | |||
1057 | } | 1056 | } |
1058 | 1057 | ||
1059 | public virtual void OnGrabGroup(Vector3 offsetPos, IClientAPI remoteClient) | 1058 | public virtual void OnGrabGroup(Vector3 offsetPos, IClientAPI remoteClient) |
@@ -1232,10 +1231,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1232 | // any exception propogate upwards. | 1231 | // any exception propogate upwards. |
1233 | 1232 | ||
1234 | if (IsDeleted || UUID == UUID.Zero) | 1233 | if (IsDeleted || UUID == UUID.Zero) |
1235 | { | ||
1236 | // DetachFromBackup(); | ||
1237 | return; | 1234 | return; |
1238 | } | ||
1239 | 1235 | ||
1240 | try | 1236 | try |
1241 | { | 1237 | { |
@@ -1359,18 +1355,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
1359 | /// <returns></returns> | 1355 | /// <returns></returns> |
1360 | public SceneObjectGroup Copy(UUID cAgentID, UUID cGroupID, bool userExposed) | 1356 | public SceneObjectGroup Copy(UUID cAgentID, UUID cGroupID, bool userExposed) |
1361 | { | 1357 | { |
1362 | SceneObjectGroup dupe = (SceneObjectGroup) MemberwiseClone(); | 1358 | SceneObjectGroup dupe = (SceneObjectGroup)MemberwiseClone(); |
1363 | dupe.m_isBackedUp = false; | 1359 | dupe.m_isBackedUp = false; |
1364 | dupe.m_parts = new Dictionary<UUID, SceneObjectPart>(); | 1360 | dupe.m_parts = new Dictionary<UUID, SceneObjectPart>(); |
1365 | dupe.m_parts.Clear(); | ||
1366 | //dupe.OwnerID = AgentID; | ||
1367 | //dupe.GroupID = GroupID; | ||
1368 | dupe.AbsolutePosition = new Vector3(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z); | 1361 | dupe.AbsolutePosition = new Vector3(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z); |
1369 | dupe.m_scene = m_scene; | ||
1370 | dupe.m_regionHandle = m_regionHandle; | ||
1371 | 1362 | ||
1372 | dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed); | 1363 | dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed); |
1373 | |||
1374 | dupe.m_rootPart.LinkNum = m_rootPart.LinkNum; | 1364 | dupe.m_rootPart.LinkNum = m_rootPart.LinkNum; |
1375 | 1365 | ||
1376 | if (userExposed) | 1366 | if (userExposed) |
@@ -1390,7 +1380,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
1390 | dupe.RootPart.PhysActor.IsPhysical); | 1380 | dupe.RootPart.PhysActor.IsPhysical); |
1391 | 1381 | ||
1392 | dupe.RootPart.PhysActor.LocalID = dupe.RootPart.LocalId; | 1382 | dupe.RootPart.PhysActor.LocalID = dupe.RootPart.LocalId; |
1393 | |||
1394 | dupe.RootPart.DoPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true); | 1383 | dupe.RootPart.DoPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true); |
1395 | } | 1384 | } |
1396 | 1385 | ||
@@ -1415,8 +1404,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1415 | { | 1404 | { |
1416 | if (part.UUID != m_rootPart.UUID) | 1405 | if (part.UUID != m_rootPart.UUID) |
1417 | { | 1406 | { |
1418 | SceneObjectPart newPart = | 1407 | SceneObjectPart newPart = dupe.CopyPart(part, OwnerID, GroupID, userExposed); |
1419 | dupe.CopyPart(part, OwnerID, GroupID, userExposed); | ||
1420 | 1408 | ||
1421 | newPart.LinkNum = part.LinkNum; | 1409 | newPart.LinkNum = part.LinkNum; |
1422 | 1410 | ||