Merge branch 'master' into careminster-presence-refactor

avinationmerge
Melanie 2010-08-10 19:49:35 +01:00
commit c2e5d1d203
11 changed files with 153 additions and 132 deletions

View File

@ -407,9 +407,8 @@ scan_old_style:
} }
if (migrations.Count < 1) if (migrations.Count < 1)
{ m_log.DebugFormat("[MIGRATIONS]: {0} data tables already up to date at revision {1}", _type, after);
m_log.InfoFormat("[MIGRATIONS]: {0} up to date, no migrations to apply", _type);
}
return migrations; return migrations;
} }
} }

View File

@ -210,6 +210,9 @@ namespace OpenSim.Data.MySQL
if (data.Data.ContainsKey("locY")) if (data.Data.ContainsKey("locY"))
data.Data.Remove("locY"); data.Data.Remove("locY");
if (data.RegionName.Length > 32)
data.RegionName = data.RegionName.Substring(0, 32);
string[] fields = new List<string>(data.Data.Keys).ToArray(); string[] fields = new List<string>(data.Data.Keys).ToArray();
using (MySqlCommand cmd = new MySqlCommand()) using (MySqlCommand cmd = new MySqlCommand())

View File

@ -4634,6 +4634,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
} }
// m_log.DebugFormat(
// "[LLCLIENTVIEW]: Constructing client update for part {0} {1} with flags {2}, localId {3}",
// data.Name, update.FullID, flags, update.ID);
update.UpdateFlags = (uint)flags; update.UpdateFlags = (uint)flags;
#endregion PrimFlags #endregion PrimFlags
@ -4766,7 +4770,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
AddLocalPacketHandler(PacketType.ObjectScale, HandleObjectScale); AddLocalPacketHandler(PacketType.ObjectScale, HandleObjectScale);
AddLocalPacketHandler(PacketType.ObjectRotation, HandleObjectRotation); AddLocalPacketHandler(PacketType.ObjectRotation, HandleObjectRotation);
AddLocalPacketHandler(PacketType.ObjectFlagUpdate, HandleObjectFlagUpdate); AddLocalPacketHandler(PacketType.ObjectFlagUpdate, HandleObjectFlagUpdate);
AddLocalPacketHandler(PacketType.ObjectImage, HandleObjectImage);
// Handle ObjectImage (TextureEntry) updates synchronously, since when updating multiple prim faces at once,
// some clients will send out a separate ObjectImage packet for each face
AddLocalPacketHandler(PacketType.ObjectImage, HandleObjectImage, false);
AddLocalPacketHandler(PacketType.ObjectGrab, HandleObjectGrab, false); AddLocalPacketHandler(PacketType.ObjectGrab, HandleObjectGrab, false);
AddLocalPacketHandler(PacketType.ObjectGrabUpdate, HandleObjectGrabUpdate, false); AddLocalPacketHandler(PacketType.ObjectGrabUpdate, HandleObjectGrabUpdate, false);
AddLocalPacketHandler(PacketType.ObjectDeGrab, HandleObjectDeGrab); AddLocalPacketHandler(PacketType.ObjectDeGrab, HandleObjectDeGrab);

View File

@ -57,9 +57,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests
config.Configs["Modules"].Set("GridServices", "LocalGridServicesConnector"); config.Configs["Modules"].Set("GridServices", "LocalGridServicesConnector");
config.Configs["GridService"].Set("LocalServiceModule", "OpenSim.Services.GridService.dll:GridService"); config.Configs["GridService"].Set("LocalServiceModule", "OpenSim.Services.GridService.dll:GridService");
config.Configs["GridService"].Set("StorageProvider", "OpenSim.Data.Null.dll"); config.Configs["GridService"].Set("StorageProvider", "OpenSim.Data.Null.dll");
config.Configs["GridService"].Set("Region_Test_Region_1", "DefaultRegion"); config.Configs["GridService"].Set("Region_Test_Region_1", "DefaultRegion");
config.Configs["GridService"].Set("Region_Test_Region_2", "FallbackRegion"); config.Configs["GridService"].Set("Region_Test_Region_2", "FallbackRegion");
config.Configs["GridService"].Set("Region_Test_Region_3", "FallbackRegion"); config.Configs["GridService"].Set("Region_Test_Region_3", "FallbackRegion");
config.Configs["GridService"].Set("Region_Other_Region_4", "FallbackRegion"); config.Configs["GridService"].Set("Region_Other_Region_4", "FallbackRegion");
m_LocalConnector = new LocalGridServicesConnector(config); m_LocalConnector = new LocalGridServicesConnector(config);
@ -128,8 +128,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests
Assert.IsNotNull(result, "Retrieved GetRegionByName is null"); Assert.IsNotNull(result, "Retrieved GetRegionByName is null");
Assert.That(result.RegionName, Is.EqualTo("Test Region 1"), "Retrieved region's name does not match"); Assert.That(result.RegionName, Is.EqualTo("Test Region 1"), "Retrieved region's name does not match");
m_LocalConnector.RegisterRegion(UUID.Zero, r2); m_LocalConnector.RegisterRegion(UUID.Zero, r2);
m_LocalConnector.RegisterRegion(UUID.Zero, r3); m_LocalConnector.RegisterRegion(UUID.Zero, r3);
m_LocalConnector.RegisterRegion(UUID.Zero, r4); m_LocalConnector.RegisterRegion(UUID.Zero, r4);
result = m_LocalConnector.GetRegionByUUID(UUID.Zero, new UUID(1)); result = m_LocalConnector.GetRegionByUUID(UUID.Zero, new UUID(1));
@ -154,38 +154,38 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests
Assert.IsNotNull(results, "Retrieved GetRegionRange collection is null"); Assert.IsNotNull(results, "Retrieved GetRegionRange collection is null");
Assert.That(results.Count, Is.EqualTo(2), "Retrieved neighbour collection is not the number expected"); Assert.That(results.Count, Is.EqualTo(2), "Retrieved neighbour collection is not the number expected");
results = m_LocalConnector.GetDefaultRegions(UUID.Zero); results = m_LocalConnector.GetDefaultRegions(UUID.Zero);
Assert.IsNotNull(results, "Retrieved GetDefaultRegions collection is null"); Assert.IsNotNull(results, "Retrieved GetDefaultRegions collection is null");
Assert.That(results.Count, Is.EqualTo(1), "Retrieved default regions collection has not the expected size"); Assert.That(results.Count, Is.EqualTo(1), "Retrieved default regions collection has not the expected size");
Assert.That(results[0].RegionID, Is.EqualTo(new UUID(1)), "Retrieved default region's UUID does not match"); Assert.That(results[0].RegionID, Is.EqualTo(new UUID(1)), "Retrieved default region's UUID does not match");
results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r1.RegionLocX, r1.RegionLocY); results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r1.RegionLocX, r1.RegionLocY);
Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 1 is null"); Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 1 is null");
Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 1 has not the expected size"); Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 1 has not the expected size");
Assert.That(results[0].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions for default region are not in the expected order 2-4-3"); Assert.That(results[0].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions for default region are not in the expected order 2-4-3");
Assert.That(results[1].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions for default region are not in the expected order 2-4-3"); Assert.That(results[1].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions for default region are not in the expected order 2-4-3");
Assert.That(results[2].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions for default region are not in the expected order 2-4-3"); Assert.That(results[2].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions for default region are not in the expected order 2-4-3");
results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r2.RegionLocX, r2.RegionLocY); results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r2.RegionLocX, r2.RegionLocY);
Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 2 is null"); Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 2 is null");
Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 2 has not the expected size"); Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 2 has not the expected size");
Assert.That(results[0].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions are not in the expected order 2-4-3"); Assert.That(results[0].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions are not in the expected order 2-4-3");
Assert.That(results[1].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions are not in the expected order 2-4-3"); Assert.That(results[1].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions are not in the expected order 2-4-3");
Assert.That(results[2].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions are not in the expected order 2-4-3"); Assert.That(results[2].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions are not in the expected order 2-4-3");
results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r3.RegionLocX, r3.RegionLocY); results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r3.RegionLocX, r3.RegionLocY);
Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 3 is null"); Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 3 is null");
Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 3 has not the expected size"); Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 3 has not the expected size");
Assert.That(results[0].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions are not in the expected order 3-4-2"); Assert.That(results[0].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions are not in the expected order 3-4-2");
Assert.That(results[1].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions are not in the expected order 3-4-2"); Assert.That(results[1].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions are not in the expected order 3-4-2");
Assert.That(results[2].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions are not in the expected order 3-4-2"); Assert.That(results[2].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions are not in the expected order 3-4-2");
results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r4.RegionLocX, r4.RegionLocY); results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r4.RegionLocX, r4.RegionLocY);
Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 4 is null"); Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 4 is null");
Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 4 has not the expected size"); Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 4 has not the expected size");
Assert.That(results[0].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions are not in the expected order 4-3-2"); Assert.That(results[0].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions are not in the expected order 4-3-2");
Assert.That(results[1].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions are not in the expected order 4-3-2"); Assert.That(results[1].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions are not in the expected order 4-3-2");
Assert.That(results[2].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions are not in the expected order 4-3-2"); Assert.That(results[2].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions are not in the expected order 4-3-2");
results = m_LocalConnector.GetHyperlinks(UUID.Zero); results = m_LocalConnector.GetHyperlinks(UUID.Zero);
Assert.IsNotNull(results, "Retrieved GetHyperlinks list is null"); Assert.IsNotNull(results, "Retrieved GetHyperlinks list is null");

View File

@ -130,8 +130,6 @@ namespace OpenSim.Region.Framework.Scenes
{ {
return (EntityBase) MemberwiseClone(); return (EntityBase) MemberwiseClone();
} }
public abstract void SetText(string text, Vector3 color, double alpha);
} }
//Nested Classes //Nested Classes

View File

@ -1363,7 +1363,7 @@ namespace OpenSim.Region.Framework.Scenes
m_regInfo.EstateSettings.Save(); m_regInfo.EstateSettings.Save();
} }
else else
m_log.ErrorFormat("[SCENE]: Unable to store account. If this simulator is connected to a grid,\n you must create the estate owner account first."); m_log.ErrorFormat("[SCENE]: Unable to store account. If this simulator is connected to a grid, you must create the estate owner account first.");
} }
else else
{ {

View File

@ -1619,7 +1619,7 @@ namespace OpenSim.Region.Framework.Scenes
ScheduleGroupForFullUpdate(); 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), Color = Color.FromArgb(0xff - (int) (alpha * 0xff),
(int) (color.X * 0xff), (int) (color.X * 0xff),
@ -1838,30 +1838,10 @@ namespace OpenSim.Region.Framework.Scenes
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) lockPartsForRead(true);
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);
}
List<SceneObjectPart> partList; List<SceneObjectPart> partList;
lockPartsForRead(true);
partList = new List<SceneObjectPart>(m_parts.Values); partList = new List<SceneObjectPart>(m_parts.Values);
lockPartsForRead(false); lockPartsForRead(false);
@ -1884,14 +1864,30 @@ namespace OpenSim.Region.Framework.Scenes
if (userExposed) if (userExposed)
{ {
dupe.UpdateParentIDs(); SceneObjectPart newPart = dupe.CopyPart(part, OwnerID, GroupID, userExposed);
dupe.HasGroupChanged = true; newPart.LinkNum = part.LinkNum;
dupe.AttachToBackup();
ScheduleGroupForFullUpdate();
} }
// 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; m_dupeInProgress = false;
} }
@ -1909,7 +1905,6 @@ namespace OpenSim.Region.Framework.Scenes
SetRootPart(part.Copy(m_scene.AllocateLocalId(), OwnerID, GroupID, m_parts.Count, userExposed)); 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 IsTemporary = ((RootPart.Flags & PrimFlags.TemporaryOnRez) != 0);
bool IsPhantom = ((RootPart.Flags & PrimFlags.Phantom) != 0); bool IsPhantom = ((RootPart.Flags & PrimFlags.Phantom) != 0);

View File

@ -151,8 +151,17 @@ namespace OpenSim.Region.Framework.Scenes
// TODO: This needs to be persisted in next XML version update! // TODO: This needs to be persisted in next XML version update!
[XmlIgnore] [XmlIgnore]
public int[] PayPrice = {-2,-2,-2,-2,-2}; public int[] PayPrice = {-2,-2,-2,-2,-2};
[XmlIgnore] [XmlIgnore]
public PhysicsActor PhysActor; public PhysicsActor PhysActor
{
get { return m_physActor; }
set
{
// m_log.DebugFormat("[SOP]: PhysActor set to {0} for {1} {2}", value, Name, UUID);
m_physActor = value;
}
}
//Xantor 20080528 Sound stuff: //Xantor 20080528 Sound stuff:
// Note: This isn't persisted in the database right now, as the fields for that aren't just there yet. // Note: This isn't persisted in the database right now, as the fields for that aren't just there yet.
@ -307,6 +316,7 @@ namespace OpenSim.Region.Framework.Scenes
/// </summary> /// </summary>
private byte m_updateFlag; private byte m_updateFlag;
private PhysicsActor m_physActor;
protected Vector3 m_acceleration; protected Vector3 m_acceleration;
protected Vector3 m_angularVelocity; protected Vector3 m_angularVelocity;
@ -406,7 +416,7 @@ namespace OpenSim.Region.Framework.Scenes
// this appears to have the same UUID (!) as the prim. If this isn't the case, one can't drag items from // this appears to have the same UUID (!) as the prim. If this isn't the case, one can't drag items from
// the prim into an agent inventory (Linden client reports that the "Object not found for drop" in its log // the prim into an agent inventory (Linden client reports that the "Object not found for drop" in its log
_flags = 0; Flags = 0;
CreateSelected = true; CreateSelected = true;
TrimPermissions(); TrimPermissions();
@ -434,7 +444,7 @@ namespace OpenSim.Region.Framework.Scenes
private uint _groupMask = (uint)PermissionMask.None; private uint _groupMask = (uint)PermissionMask.None;
private uint _everyoneMask = (uint)PermissionMask.None; private uint _everyoneMask = (uint)PermissionMask.None;
private uint _nextOwnerMask = (uint)PermissionMask.All; private uint _nextOwnerMask = (uint)PermissionMask.All;
private PrimFlags _flags = 0; private PrimFlags _flags = PrimFlags.None;
private DateTime m_expires; private DateTime m_expires;
private DateTime m_rezzed; private DateTime m_rezzed;
private bool m_createSelected = false; private bool m_createSelected = false;
@ -485,10 +495,14 @@ namespace OpenSim.Region.Framework.Scenes
} }
} }
/// <summary>
/// This is idential to the Flags property, except that the returned value is uint rather than PrimFlags
/// </summary>
[Obsolete("Use Flags property instead")]
public uint ObjectFlags public uint ObjectFlags
{ {
get { return (uint)_flags; } get { return (uint)Flags; }
set { _flags = (PrimFlags)value; } set { Flags = (PrimFlags)value; }
} }
public UUID UUID public UUID UUID
@ -1026,7 +1040,11 @@ namespace OpenSim.Region.Framework.Scenes
public bool CreateSelected public bool CreateSelected
{ {
get { return m_createSelected; } get { return m_createSelected; }
set { m_createSelected = value; } set
{
// m_log.DebugFormat("[SOP]: Setting CreateSelected to {0} for {1} {2}", value, Name, UUID);
m_createSelected = value;
}
} }
#endregion #endregion
@ -1194,7 +1212,11 @@ namespace OpenSim.Region.Framework.Scenes
public PrimFlags Flags public PrimFlags Flags
{ {
get { return _flags; } get { return _flags; }
set { _flags = value; } set
{
// m_log.DebugFormat("[SOP]: Setting flags for {0} {1} to {2}", UUID, Name, value);
_flags = value;
}
} }
[XmlIgnore] [XmlIgnore]
@ -1329,7 +1351,7 @@ namespace OpenSim.Region.Framework.Scenes
if ((ObjectFlags & (uint) flag) == 0) if ((ObjectFlags & (uint) flag) == 0)
{ {
//m_log.Debug("Adding flag: " + ((PrimFlags) flag).ToString()); //m_log.Debug("Adding flag: " + ((PrimFlags) flag).ToString());
_flags |= flag; Flags |= flag;
if (flag == PrimFlags.TemporaryOnRez) if (flag == PrimFlags.TemporaryOnRez)
ResetExpire(); ResetExpire();
@ -1554,7 +1576,7 @@ namespace OpenSim.Region.Framework.Scenes
} }
else else
{ {
m_log.DebugFormat("[SPEW]: physics actor is null for {0} with parent {1}", UUID, this.ParentGroup.UUID); m_log.DebugFormat("[SOP]: physics actor is null for {0} with parent {1}", UUID, this.ParentGroup.UUID);
} }
} }
} }
@ -1824,7 +1846,7 @@ namespace OpenSim.Region.Framework.Scenes
/// that's not wholesome. Had to make Scene public /// that's not wholesome. Had to make Scene public
//PhysActor = null; //PhysActor = null;
if ((ObjectFlags & (uint)PrimFlags.Phantom) == 0) if ((Flags & PrimFlags.Phantom) == 0)
{ {
if (UsePhysics) if (UsePhysics)
{ {
@ -1971,12 +1993,14 @@ namespace OpenSim.Region.Framework.Scenes
} }
public uint GetEffectiveObjectFlags() public uint GetEffectiveObjectFlags()
{ {
PrimFlags f = _flags; // Commenting this section of code out since it doesn't actually do anything, as enums are handled by
if (m_parentGroup == null || m_parentGroup.RootPart == this) // value rather than reference
f &= ~(PrimFlags.Touch | PrimFlags.Money); // PrimFlags f = _flags;
// if (m_parentGroup == null || m_parentGroup.RootPart == this)
// f &= ~(PrimFlags.Touch | PrimFlags.Money);
return (uint)_flags | (uint)LocalFlags; return (uint)Flags | (uint)LocalFlags;
} }
public Vector3 GetGeometricCenter() public Vector3 GetGeometricCenter()
@ -2733,10 +2757,10 @@ namespace OpenSim.Region.Framework.Scenes
public void RemFlag(PrimFlags flag) public void RemFlag(PrimFlags flag)
{ {
// PrimFlags prevflag = Flags; // PrimFlags prevflag = Flags;
if ((ObjectFlags & (uint) flag) != 0) if ((Flags & flag) != 0)
{ {
//m_log.Debug("Removing flag: " + ((PrimFlags)flag).ToString()); //m_log.Debug("Removing flag: " + ((PrimFlags)flag).ToString());
_flags &= ~flag; Flags &= ~flag;
} }
//m_log.Debug("prev: " + prevflag.ToString() + " curr: " + Flags.ToString()); //m_log.Debug("prev: " + prevflag.ToString() + " curr: " + Flags.ToString());
//ScheduleFullUpdate(); //ScheduleFullUpdate();
@ -2999,10 +3023,10 @@ namespace OpenSim.Region.Framework.Scenes
if (remoteClient.AgentId == _ownerID) if (remoteClient.AgentId == _ownerID)
{ {
if ((uint) (_flags & PrimFlags.CreateSelected) != 0) if ((Flags & PrimFlags.CreateSelected) != 0)
{ {
clientFlags |= (uint) PrimFlags.CreateSelected; clientFlags |= (uint) PrimFlags.CreateSelected;
_flags &= ~PrimFlags.CreateSelected; Flags &= ~PrimFlags.CreateSelected;
} }
} }
//bool isattachment = IsAttachment; //bool isattachment = IsAttachment;
@ -3308,6 +3332,7 @@ namespace OpenSim.Region.Framework.Scenes
texcolor.B = Util.Clip((float)color.Z, 0.0f, 1.0f); texcolor.B = Util.Clip((float)color.Z, 0.0f, 1.0f);
tex.FaceTextures[face].RGBA = texcolor; tex.FaceTextures[face].RGBA = texcolor;
UpdateTexture(tex); UpdateTexture(tex);
TriggerScriptChangedEvent(Changed.COLOR);
return; return;
} }
else if (face == ALL_SIDES) else if (face == ALL_SIDES)
@ -3329,6 +3354,7 @@ namespace OpenSim.Region.Framework.Scenes
tex.DefaultTexture.RGBA = texcolor; tex.DefaultTexture.RGBA = texcolor;
} }
UpdateTexture(tex); UpdateTexture(tex);
TriggerScriptChangedEvent(Changed.COLOR);
return; return;
} }
} }

View File

@ -3560,11 +3560,6 @@ namespace OpenSim.Region.Framework.Scenes
} }
} }
public override void SetText(string text, Vector3 color, double alpha)
{
throw new Exception("Can't set Text on avatar.");
}
/// <summary> /// <summary>
/// Adds a physical representation of the avatar to the Physics plugin /// Adds a physical representation of the avatar to the Physics plugin
/// </summary> /// </summary>

View File

@ -48,24 +48,42 @@ namespace OpenSim.Region.Framework.Scenes.Tests
TestHelper.InMethod(); TestHelper.InMethod();
Scene scene = SceneSetupHelpers.SetupScene(); Scene scene = SceneSetupHelpers.SetupScene();
UUID ownerUuid = new UUID("00000000-0000-0000-0000-000000000010"); UUID ownerId = new UUID("00000000-0000-0000-0000-000000000010");
string objName = "obj1"; string part1Name = "part1";
UUID objUuid = new UUID("00000000-0000-0000-0000-000000000001"); UUID part1Id = new UUID("00000000-0000-0000-0000-000000000001");
string part2Name = "part2";
UUID part2Id = new UUID("00000000-0000-0000-0000-000000000002");
SceneObjectPart part SceneObjectPart part1
= new SceneObjectPart(ownerUuid, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) = new SceneObjectPart(ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
{ Name = objName, UUID = objUuid }; { Name = part1Name, UUID = part1Id };
SceneObjectGroup so = new SceneObjectGroup(part1);
SceneObjectPart part2
= new SceneObjectPart(ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
{ Name = part2Name, UUID = part2Id };
so.AddPart(part2);
scene.AddNewSceneObject(new SceneObjectGroup(part), false); scene.AddNewSceneObject(so, false);
SceneObjectGroup duplicatedSo SceneObjectGroup dupeSo
= scene.SceneGraph.DuplicateObject( = scene.SceneGraph.DuplicateObject(
part.LocalId, new Vector3(10, 0, 0), 0, ownerUuid, UUID.Zero, Quaternion.Identity); part1.LocalId, new Vector3(10, 0, 0), 0, ownerId, UUID.Zero, Quaternion.Identity);
Assert.That(dupeSo.Children.Count, Is.EqualTo(2));
Assert.That(duplicatedSo.Children.Count, Is.EqualTo(1)); SceneObjectPart dupePart1 = dupeSo.GetLinkNumPart(1);
Assert.That(duplicatedSo.RootPart.LocalId, Is.Not.EqualTo(part.LocalId)); SceneObjectPart dupePart2 = dupeSo.GetLinkNumPart(2);
Assert.That(dupePart1.LocalId, Is.Not.EqualTo(part1.LocalId));
Assert.That(dupePart2.LocalId, Is.Not.EqualTo(part2.LocalId));
//SceneObjectPart retrievedPart = scene.GetSceneObjectPart(objUuid); Assert.That(dupePart1.Flags, Is.EqualTo(part1.Flags));
Assert.That(dupePart2.Flags, Is.EqualTo(part2.Flags));
/*
Assert.That(part1.PhysActor, Is.Not.Null);
Assert.That(part2.PhysActor, Is.Not.Null);
Assert.That(dupePart1.PhysActor, Is.Not.Null);
Assert.That(dupePart2.PhysActor, Is.Not.Null);
*/
} }
} }
} }

View File

@ -247,21 +247,8 @@ namespace OpenSim.Services.GridService
} }
regInfo.RegionID = regionID; regInfo.RegionID = regionID;
Uri uri = null; if (regInfo.RegionName == string.Empty)
try regInfo.RegionName = regInfo.ExternalHostName;
{
uri = new Uri(externalName);
regInfo.ExternalHostName = uri.Host;
regInfo.HttpPort = (uint)uri.Port;
}
catch
{
m_log.WarnFormat("[HYPERGRID LINKER]: Remote Gatekeeper at {0} provided malformed ExternalName {1}", regInfo.ExternalHostName, externalName);
}
string name = regInfo.RegionName;
regInfo.RegionName = regInfo.ExternalHostName + ":" + regInfo.HttpPort;
if (name != string.Empty)
regInfo.RegionName += ":" + name;
// Try get the map image // Try get the map image
//regInfo.TerrainImage = m_GatekeeperConnector.GetMapImage(regionID, imageURL); //regInfo.TerrainImage = m_GatekeeperConnector.GetMapImage(regionID, imageURL);
@ -384,8 +371,6 @@ namespace OpenSim.Services.GridService
private void AddHyperlinkRegion(GridRegion regionInfo, ulong regionHandle) private void AddHyperlinkRegion(GridRegion regionInfo, ulong regionHandle)
{ {
//m_HyperlinkRegions[regionInfo.RegionID] = regionInfo;
//m_HyperlinkHandles[regionInfo.RegionID] = regionHandle;
RegionData rdata = m_GridService.RegionInfo2RegionData(regionInfo); RegionData rdata = m_GridService.RegionInfo2RegionData(regionInfo);
int flags = (int)OpenSim.Data.RegionFlags.Hyperlink + (int)OpenSim.Data.RegionFlags.NoDirectLogin + (int)OpenSim.Data.RegionFlags.RegionOnline; int flags = (int)OpenSim.Data.RegionFlags.Hyperlink + (int)OpenSim.Data.RegionFlags.NoDirectLogin + (int)OpenSim.Data.RegionFlags.RegionOnline;
@ -397,12 +382,6 @@ namespace OpenSim.Services.GridService
private void RemoveHyperlinkRegion(UUID regionID) private void RemoveHyperlinkRegion(UUID regionID)
{ {
//// Try the hyperlink collection
//if (m_HyperlinkRegions.ContainsKey(regionID))
//{
// m_HyperlinkRegions.Remove(regionID);
// m_HyperlinkHandles.Remove(regionID);
//}
m_Database.Delete(regionID); m_Database.Delete(regionID);
} }