Merge branch 'master' into careminster-presence-refactor

This commit is contained in:
Melanie
2010-08-10 19:49:35 +01:00
11 changed files with 153 additions and 132 deletions

View File

@@ -1619,7 +1619,7 @@ namespace OpenSim.Region.Framework.Scenes
ScheduleGroupForFullUpdate();
}
public override void SetText(string text, Vector3 color, double alpha)
public void SetText(string text, Vector3 color, double alpha)
{
Color = Color.FromArgb(0xff - (int) (alpha * 0xff),
(int) (color.X * 0xff),
@@ -1838,30 +1838,10 @@ namespace OpenSim.Region.Framework.Scenes
dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed);
dupe.m_rootPart.LinkNum = m_rootPart.LinkNum;
if (userExposed)
dupe.m_rootPart.TrimPermissions();
/// may need to create a new Physics actor.
if (dupe.RootPart.PhysActor != null && userExposed)
{
PrimitiveBaseShape pbs = dupe.RootPart.Shape;
dupe.RootPart.PhysActor = m_scene.PhysicsScene.AddPrimShape(
dupe.RootPart.Name,
pbs,
dupe.RootPart.AbsolutePosition,
dupe.RootPart.Scale,
dupe.RootPart.RotationOffset,
dupe.RootPart.PhysActor.IsPhysical);
dupe.RootPart.PhysActor.LocalID = dupe.RootPart.LocalId;
dupe.RootPart.DoPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true);
}
lockPartsForRead(true);
List<SceneObjectPart> partList;
lockPartsForRead(true);
partList = new List<SceneObjectPart>(m_parts.Values);
lockPartsForRead(false);
@@ -1884,14 +1864,30 @@ namespace OpenSim.Region.Framework.Scenes
if (userExposed)
{
dupe.UpdateParentIDs();
dupe.HasGroupChanged = true;
dupe.AttachToBackup();
ScheduleGroupForFullUpdate();
SceneObjectPart newPart = dupe.CopyPart(part, OwnerID, GroupID, userExposed);
newPart.LinkNum = part.LinkNum;
}
// Need to duplicate the physics actor as well
if (part.PhysActor != null && userExposed)
{
PrimitiveBaseShape pbs = part.Shape;
part.PhysActor
= m_scene.PhysicsScene.AddPrimShape(
part.Name,
pbs,
part.AbsolutePosition,
part.Scale,
part.RotationOffset,
part.PhysActor.IsPhysical);
part.PhysActor.LocalID = part.LocalId;
part.DoPhysicsPropertyUpdate(part.PhysActor.IsPhysical, true);
}
}
finally
if (userExposed)
{
m_dupeInProgress = false;
}
@@ -1909,7 +1905,6 @@ namespace OpenSim.Region.Framework.Scenes
SetRootPart(part.Copy(m_scene.AllocateLocalId(), OwnerID, GroupID, m_parts.Count, userExposed));
}
public void ScriptSetPhysicsStatus(bool UsePhysics)
{
bool IsTemporary = ((RootPart.Flags & PrimFlags.TemporaryOnRez) != 0);
bool IsPhantom = ((RootPart.Flags & PrimFlags.Phantom) != 0);