Remove windows line endinge

avinationmerge
Melanie 2010-08-10 19:42:18 +01:00
parent 912bfba20c
commit d98d5ee6be
2 changed files with 118 additions and 118 deletions

View File

@ -317,7 +317,7 @@ namespace OpenSim.Region.Framework.Scenes
private bool m_scriptListens_notAtTarget = false; private bool m_scriptListens_notAtTarget = false;
private bool m_scriptListens_atRotTarget = false; private bool m_scriptListens_atRotTarget = false;
private bool m_scriptListens_notAtRotTarget = false; private bool m_scriptListens_notAtRotTarget = false;
public bool m_dupeInProgress = false; public bool m_dupeInProgress = false;
internal Dictionary<UUID, string> m_savedScriptState = null; internal Dictionary<UUID, string> m_savedScriptState = null;
@ -475,21 +475,21 @@ namespace OpenSim.Region.Framework.Scenes
{ {
part.IgnoreUndoUpdate = false; part.IgnoreUndoUpdate = false;
part.StoreUndoState(UndoType.STATE_GROUP_POSITION); part.StoreUndoState(UndoType.STATE_GROUP_POSITION);
part.GroupPosition = val; part.GroupPosition = val;
if (!m_dupeInProgress) if (!m_dupeInProgress)
{ {
part.TriggerScriptChangedEvent(Changed.POSITION); part.TriggerScriptChangedEvent(Changed.POSITION);
}
}
if (!m_dupeInProgress)
{
foreach (ScenePresence av in m_linkedAvatars)
{
Vector3 offset = m_parts[av.LinkedPrim].GetWorldPosition() - av.ParentPosition;
av.AbsolutePosition += offset;
av.ParentPosition = m_parts[av.LinkedPrim].GetWorldPosition(); //ParentPosition gets cleared by AbsolutePosition
av.SendFullUpdateToAllClients();
} }
}
if (!m_dupeInProgress)
{
foreach (ScenePresence av in m_linkedAvatars)
{
Vector3 offset = m_parts[av.LinkedPrim].GetWorldPosition() - av.ParentPosition;
av.AbsolutePosition += offset;
av.ParentPosition = m_parts[av.LinkedPrim].GetWorldPosition(); //ParentPosition gets cleared by AbsolutePosition
av.SendFullUpdateToAllClients();
}
} }
//if (m_rootPart.PhysActor != null) //if (m_rootPart.PhysActor != null)
@ -1805,95 +1805,95 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="userExposed">True if the duplicate will immediately be in the scene, false otherwise</param> /// <param name="userExposed">True if the duplicate will immediately be in the scene, false otherwise</param>
/// <returns></returns> /// <returns></returns>
public SceneObjectGroup Copy(bool userExposed) public SceneObjectGroup Copy(bool userExposed)
{ {
SceneObjectGroup dupe; SceneObjectGroup dupe;
try try
{ {
m_dupeInProgress = true; m_dupeInProgress = true;
dupe = (SceneObjectGroup)MemberwiseClone(); dupe = (SceneObjectGroup)MemberwiseClone();
dupe.m_isBackedUp = false; dupe.m_isBackedUp = false;
dupe.m_parts = new Dictionary<UUID, SceneObjectPart>(); dupe.m_parts = new Dictionary<UUID, SceneObjectPart>();
// Warning, The following code related to previousAttachmentStatus is needed so that clones of // Warning, The following code related to previousAttachmentStatus is needed so that clones of
// attachments do not bordercross while they're being duplicated. This is hacktastic! // attachments do not bordercross while they're being duplicated. This is hacktastic!
// Normally, setting AbsolutePosition will bordercross a prim if it's outside the region! // Normally, setting AbsolutePosition will bordercross a prim if it's outside the region!
// unless IsAttachment is true!, so to prevent border crossing, we save it's attachment state // unless IsAttachment is true!, so to prevent border crossing, we save it's attachment state
// (which should be false anyway) set it as an Attachment and then set it's Absolute Position, // (which should be false anyway) set it as an Attachment and then set it's Absolute Position,
// then restore it's attachment state // then restore it's attachment state
// This is only necessary when userExposed is false! // This is only necessary when userExposed is false!
bool previousAttachmentStatus = dupe.RootPart.IsAttachment; bool previousAttachmentStatus = dupe.RootPart.IsAttachment;
if (!userExposed) if (!userExposed)
dupe.RootPart.IsAttachment = true; dupe.RootPart.IsAttachment = true;
dupe.AbsolutePosition = new Vector3(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z); dupe.AbsolutePosition = new Vector3(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z);
if (!userExposed) if (!userExposed)
{ {
dupe.RootPart.IsAttachment = previousAttachmentStatus; dupe.RootPart.IsAttachment = previousAttachmentStatus;
} }
dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed); dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed);
dupe.m_rootPart.LinkNum = m_rootPart.LinkNum; dupe.m_rootPart.LinkNum = m_rootPart.LinkNum;
if (userExposed) if (userExposed)
dupe.m_rootPart.TrimPermissions(); dupe.m_rootPart.TrimPermissions();
/// may need to create a new Physics actor. /// may need to create a new Physics actor.
if (dupe.RootPart.PhysActor != null && userExposed) if (dupe.RootPart.PhysActor != null && userExposed)
{ {
PrimitiveBaseShape pbs = dupe.RootPart.Shape; PrimitiveBaseShape pbs = dupe.RootPart.Shape;
dupe.RootPart.PhysActor = m_scene.PhysicsScene.AddPrimShape( dupe.RootPart.PhysActor = m_scene.PhysicsScene.AddPrimShape(
dupe.RootPart.Name, dupe.RootPart.Name,
pbs, pbs,
dupe.RootPart.AbsolutePosition, dupe.RootPart.AbsolutePosition,
dupe.RootPart.Scale, dupe.RootPart.Scale,
dupe.RootPart.RotationOffset, dupe.RootPart.RotationOffset,
dupe.RootPart.PhysActor.IsPhysical); dupe.RootPart.PhysActor.IsPhysical);
dupe.RootPart.PhysActor.LocalID = dupe.RootPart.LocalId; dupe.RootPart.PhysActor.LocalID = dupe.RootPart.LocalId;
dupe.RootPart.DoPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true); dupe.RootPart.DoPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true);
} }
List<SceneObjectPart> partList; List<SceneObjectPart> partList;
lockPartsForRead(true); lockPartsForRead(true);
partList = new List<SceneObjectPart>(m_parts.Values); partList = new List<SceneObjectPart>(m_parts.Values);
lockPartsForRead(false); lockPartsForRead(false);
partList.Sort(delegate(SceneObjectPart p1, SceneObjectPart p2) partList.Sort(delegate(SceneObjectPart p1, SceneObjectPart p2)
{ {
return p1.LinkNum.CompareTo(p2.LinkNum); return p1.LinkNum.CompareTo(p2.LinkNum);
} }
); );
foreach (SceneObjectPart part in partList) foreach (SceneObjectPart part in partList)
{ {
if (part.UUID != m_rootPart.UUID) if (part.UUID != m_rootPart.UUID)
{ {
SceneObjectPart newPart = dupe.CopyPart(part, OwnerID, GroupID, userExposed); SceneObjectPart newPart = dupe.CopyPart(part, OwnerID, GroupID, userExposed);
newPart.LinkNum = part.LinkNum; newPart.LinkNum = part.LinkNum;
} }
} }
if (userExposed) if (userExposed)
{ {
dupe.UpdateParentIDs(); dupe.UpdateParentIDs();
dupe.HasGroupChanged = true; dupe.HasGroupChanged = true;
dupe.AttachToBackup(); dupe.AttachToBackup();
ScheduleGroupForFullUpdate(); ScheduleGroupForFullUpdate();
} }
} }
finally finally
{ {
m_dupeInProgress = false; m_dupeInProgress = false;
} }
return dupe; return dupe;
} }

View File

@ -718,20 +718,20 @@ namespace OpenSim.Region.Framework.Scenes
// Tell the physics engines that this prim changed. // Tell the physics engines that this prim changed.
m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor); m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
} }
if (!m_parentGroup.m_dupeInProgress) if (!m_parentGroup.m_dupeInProgress)
{ {
List<ScenePresence> avs = ParentGroup.GetLinkedAvatars(); List<ScenePresence> avs = ParentGroup.GetLinkedAvatars();
foreach (ScenePresence av in avs) foreach (ScenePresence av in avs)
{ {
if (av.LinkedPrim == m_uuid) if (av.LinkedPrim == m_uuid)
{ {
Vector3 offset = (m_offsetPosition - oldpos); Vector3 offset = (m_offsetPosition - oldpos);
av.OffsetPosition += offset; av.OffsetPosition += offset;
av.SendFullUpdateToAllClients(); av.SendFullUpdateToAllClients();
} }
} }
} }
} }
TriggerScriptChangedEvent(Changed.POSITION); TriggerScriptChangedEvent(Changed.POSITION);